1. Installing Python

Python can be installed in many ways or may even already be installed on your machine (e.g., on some Unix distros). However, to avoid conflicts between package dependencies, and for a cleaner and more reproducible workflow, phenopype should always be installed inside a Python virtual environment that you create first. To do so, use a package and environment management system like “mamba” (see below), “pipenv”, or “conda”.

1.1. Install mamba through miniforge

Download and install miniforge to create virtual environments using mamba (it’s like conda but a lot faster), which is a scientific Python distribution that comes with some packages already built in. Download the Miniforge3 installer (under “Latest installers with Python 3.10 in the base environment”) for your OS and follow the installation instructions. Then, open the Miniforge prompt or terminal, and type:

mamba init

If you get an error, refer to the references below for troubleshooting.

1.2. Create a virtual environment with mamba

Use mamba to create a new Python virtual environment (needs to be Python 3.9 for phenopype):

mamba create -n <NAME> python=3.9  # <NAME> == chosen name, e.g. "pp-env"
mamba activate <NAME>                      # activates the new environment

After successful installation and activation, you should see the name of the environment in the console - e.g.:

(pp-env) D:\projects>

Now all libraries installed into this environment will be isolated from those installed in other virtual environments. You can now move on to install phenopype.