pantonante
5/15/2018 - 6:06 PM

Virtualenv & Anaconda

Creating a Python sandbox

Create the virtual environment

virtualenv -p python3 ~/myenv

The option-p selects the Python interpreter to use, e.g., --python=python2.5 will use the python2.5 interpreter to create the new environment. The default is the python2 interpreter on your path.

Export Anaconda environment

source activate env-name
conda env export | grep -v "^prefix: " > environment.yml