Skip to content

Latest commit

 

History

History
75 lines (48 loc) · 3.43 KB

InstallationLocal.md

File metadata and controls

75 lines (48 loc) · 3.43 KB

Local Installation

This option is the best for developers and users who are familiar with working with Python packages as it works well with VSCode and other IDE and development environments.

Anaconda/Miniconda

The use of virtual environments for the installation is highly recommended in order to avoid package clashes as much as possible. Please install miniconda to follow the next instructions.

Installing the base package is fairly straightforward. We first create a conda environment named MGSurvE running Python 3.10:

conda config --add channels conda-forge
conda create -n MGSurvE python="3.10" -y

With this in place, we can now activate our environment and install MGSurvE in it (along with jupyterlab for the contents of this webinar):

conda activate MGSurvE
pip install MGSurvE
conda install -c conda-forge jupyterlab

We can now test our installation by opening a Python session and loading the library:

python
import MGSurvE as srv

As cartopy is not currently installed in our environment, we will get the following warnings:

warnings.warn("Cartopy not installed. Lat/Long plots might be incorrect!")
warnings.warn("cartopy installation was not detected! Geo-boundaries (plotLandBoundary) not available!")

This is not an error and will only affect the plotting behaviour if we tried to work with latitude/longitude coordinate systems instead of catesian ones. If we wanted to install cartopy, we can exit our Python session and install it with conda:

exit()
conda install cartopy -y

Installing cartopy is not strictly required for MGSurvE, so this step can be skipped if maps are going to be generated through another GIS library.

Finally, to launch jupyterlab to follow the materials of the webinar (after cloning or downloading the repo), run:

jupyter notebook

which should launch a jupyterlab session in our default internet browser, where we can run the webinar's code!

Directly in System (not recommended)

Installing the package directly in the system with no virtual environment is discouraged as it can create dependencies clashes but, if needed, it can be done through the following command:

pip install MGSurvE

Additional dependencies would need to be installed independently, so please follow the instructions in their websites for more information: cartopy, libpysal.

Cloning the Webinar Materials

If we have a github account, we can download all the webinar's materials with:

git clone [email protected]:Chipdelmal/MGSurvE_Webinar2023.git

Alternatively, we can download them by going to the repo's main page and clicking the Code/Download zip option.