Wednesday, February 15, 2017
Conda create environment commands
Conda create environment commands - super easy but nice to have as a reference:
# Python 2.7 $ conda create -n myenvname python=2.7 # Python 3.4 $ conda create -n myenvname python=3.4 # Python 3.x latest $ conda create -n myenvname python=3
$ source activate myenvname
More info: https://conda.io/docs/using/envs.html
If you then have a requirements.txt file, you can install the listed packages with:
conda install --yes --file requirements.txt
If you want to reproduce an existing conda environment on another machine, you can get a snapshot with:
conda env export > freeze.yml
which can then be restored via:
conda env create -f freeze.yml
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment