2.1. Install and Configure a Python Environment¶
A Python environment provides the Python 3 interpreter. The Anaconda Individual Edition is the recommended distribution to install to provide a Python environment and a Python 3 interpreter. Instructions and helper files are provided for working with this distribution in Section Anaconda Install Instructions.
You can use any Python distribution that is desired as long as you ensure the requirements, listed in Python Requirements, are fulfilled.
2.1.1. Python Requirements¶
pyHS2MF6 has only been used and tested with Python 3.8. The current recommned version is 3.8.10.
In addition to Python 3.8.10, a number of add-on Python libraries or packages are required by pyHS2MF6. These packages are listed below.
The following packages are not strictly required by pyHS2MF6 but are used for pre- and post-processing in the example models.
Jupyter notebooks jupyterlab 3.0.14
matplotlib 3.3.4
GeoPandas 0.6.1
Shapely - installed as part of the GeoPandas installation.
2.1.2. Anaconda Install Instructions¶
Download the Python 3.8 Anaconda Graphical Installer and follow the installation instructions
Open an Anaconda Prompt.
Install a pre-configured virtual environment for use with pyHS2MF6 using the file pyHS2MF6_env.yml in the installation directory by running the following command from the Anaconda Prompt.
conda env create -f pyHS2MF6_env.yml
In the file pyHS2MF6_env.yml, the last section is usually the prefix: section. You will need to edit this to be the appropriate path on your computer in order to have the virtual environment installation and configuration complete on your computer.
When you use pyHS2MF6 in the future, you will want to run it from the virtual environment that was just created. To use the virtual environment, you need to activate it and when you are done with it, deactivate it.