Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
283 views
in Technique[技术] by (71.8m points)

Can I choose where my conda environment is stored?

Can I change the path /Users/nolan/miniconda/envs/ to another one when creating a virtual environment ? I'd like it to be specific to my project directory. (As we can do with virtualenv)

$conda info -e
Using Anaconda Cloud api site https://api.anaconda.org
# conda environments:
#
_build                   /Users/nolan/miniconda/envs/_build
myen3                    /Users/nolan/miniconda/envs/myen3
nolanemirot              /Users/nolan/miniconda/envs/nolanemirot
root                  *  /Users/nolan/miniconda
question from:https://stackoverflow.com/questions/35280479/can-i-choose-where-my-conda-environment-is-stored

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can change the environments directory by editing your .condarc file found in your user directory. Add the following specifying the path to the directory you want:

envs_dirs:
  - /Users/nolan/newpath

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...