我可以选择conda环境的存储位置吗? [英] Can I choose where my conda environment is stored?

查看:436
本文介绍了我可以选择conda环境的存储位置吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

创建虚拟环境时,可以将/ Users / nolan / miniconda / envs /路径更改为另一路径吗?我希望它特定于我的项目目录。 (正如我们可以使用virtualenv一样)

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


推荐答案

您可以通过编辑用户目录中的.condarc文件来更改环境目录。添加以下内容,指定所需目录的路径:

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

这篇关于我可以选择conda环境的存储位置吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆