康达我如何激活环境 [英] conda how do I activate environments
问题描述
我正在努力激活在Mac OS X上创建的conda环境. 这是我创建的环境.
I am struggling to activate conda environments I have created on mac os x. Here are the environment that I have created.
$: conda env list
# conda environments:
#
py34 /Students/rt12083/anaconda3/envs/py34
py35 /Students/rt12083/anaconda3/envs/py35
root * /Students/rt12083/anaconda3
当我尝试激活它们时,出现以下错误:
When I try to activate them I get the following error:
$: source activate py34
activate: No such file or directory.
当我运行命令which activate
时,我得到以下信息:
When i run the command which activate
I get the following:
which activate
/Students/rt12083/anaconda3/bin/activate
我的path
变量是:
garnet: echo $PATH
/sw/bin:/sw/sbin:.:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/local/bin:/ Developer/Tools:/usr/local/GMT4.5.7/bin:/usr/local/TauP/bin:/usr/local/SU/bin:/usr/local/sac/bin:/usr/local/sac/iaspei:/usr/local/sac/macros:/Students/rt12083/anaconda3/bin
我需要做什么来激活环境?
What do I need to do to activate the environments?
推荐答案
您的路径似乎缺少anaconda根目录.当我回显$ Path(用户名替换我的实际用户名)时,我有以下内容:
Your path seems to be missing the root anaconda directory. when i echo $Path (where username is replacing my actual username) i have the following:
/用户/用户名/anaconda/bin:/用户/用户名/anaconda/bin:/用户/用户名/anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
/Users/username/anaconda/bin:/Users/username/anaconda/bin:/Users/username/anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
在我的bash_profile(或zshrc文件等)中,我添加了:
in my bash_profile (or zshrc file etc...) I added:
export PATH ="/Users/username/anaconda/bin:$ PATH"
export PATH="/Users/username/anaconda/bin:$PATH"
我将iterm2与zsh一起使用,尽管这可能适用于更一般的情况.
I use iterm2 with zsh, although this probably applies to more general cases.
在具有Anaconda3 4.4.0的OSX Sierra上,路径现在为:
On OSX Sierra with Anaconda3 4.4.0 the path is now:
export PATH ="/anaconda/bin:$ PATH"
export PATH="/anaconda/bin:$PATH"
这篇关于康达我如何激活环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!