Create a virtual environment based on a .txt file via pip
In order to synchronize all python dependencies one recommended option is to install all packages from a requirements.txt file which can be found in the GitHub repository. Please use and adjust the following code snippets as needed. Note, commands depend on your operating system.
# navigate to the directory that contains the requirements.txt file
# check python version to ensure it is any 3.9 version, if not install it
python3 -V
# create a virtual environment named e.g. .climatematch, here macOS & Unix
python3 -m venv .climatematch
# windows
# py -m venv .climatematch
# list all hidden files and folders like .climatematch
ls-a
# activate virtual environment, here macOS & Unix
source .climatematch/bin/activate
# windows
# .climatematch\Scripts\activate
# update pip if necessary
pip install--upgrade pip
# install required packages from txt file
pip install-r requirements.txt
Create a conda environment based on a .yml or .txt file
A second option is to use conda or mamba to create an environment from a provided .yml file.
# navigate to the directory that contains the environment.yml file,
# likely the forked repository
# create env from yml file
conda env create -f environment.yml
# or another option faster, if mamba is installed properly
mamba env create -f environment.yml
# name of env in line 1 of .yml file, here climatematch