Virtualenvs



Tool to manage and isolate project dependencies. Documentation

  • Reproducibility crisis no more!
    • Have all of the packages you need for a specific project in the exact version needed.
    • Share your env including all packages and their dependencies.

Bread and Butter Commands

To create a virtual env:

conda create --name <env_name> python=3.8 <package>

To activate a virtual env:

conda activate <env_name>

Install a package to the virtual env:

conda install numpy

To view a list of your envs:

conda env list

To exit the env:

conda deactivate

To export your env:

conda activate <env_name>
conda env export > environment.yml

To duplicate an existing env:

conda install -n <env_name> environment.yml
conda activate <env_name>

Need to Know

  • Virtual envs will live in your home dir /opt/anaconda3/envs/.