Quick links:
It is recommended to always work in a virtual environment. Virtual environments are isolated and don't interfere with each other or with the system-wide Python setup. When needed, you can set up different environments for different branches of your project. The recommendation is to use conda environments, but you can also work with Python virtual environments if you so wish. The detailed instructions provided here, however, refer only to conda.
If you are working on your own laptop, you need first to install conda. The recommendation is to use the minimal conda installer called miniconda. Download the Miniconda installer for your operating system and follow the installation instructions on the miniconda website.
Once you have miniconda, you can create conda environments from the command line, or by using a yml file. For Linux and MacOs, you can do this via a terminal, while forWindows, you can use the Anaconda Powershell prompt.
Download the example yml file and navigate to the folder with the prompt command:
$ cd path/to/your/yml/folder
Create the environment:
$ conda env create -f myenv.yml
Check that the installation worked correctly by activating the environment and starting a Jupyter notebook:
$ conda activate my-env
$ jupyter-lab
If you would like to completely remove a conda environment, first deactivate it:
$ conda deactivate
Then, remove and clean:
$ conda remove -n my-env --all
$ conda clean --all
For Windows users:
If creating the conda environment fails due to an error related to the scikit-build program package, open myenv.yml and remove the scikit-build dependency from the list. Run the `conda clean --all` command to clean the cache and then try again the command `conda env create -f myenv.yml` with the updated yml file.