Reputation: 309
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.
When i run the command which activate
I get the following:
which activate
/Students/rt12083/anaconda3/bin/activate
my path
variable is:
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?
Upvotes: 21
Views: 46783
Reputation: 71
use the following
conda create -n your_Env_Name
Then activate it with:
conda activate your_Env_Name
Upvotes: 3
Reputation: 155
I use miniconda2, so not sure if this will work but: open terminal & navigate to wherever you have conda installed. for me its /Users/username/miniconda 2
and then do source activate env_name
and then you can navigate back to your development directory
Upvotes: 0
Reputation: 555
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:
/Users/username/anaconda/bin:/Users/username/anaconda/bin:/Users/username/anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
in my bash_profile (or zshrc file etc...) I added:
export PATH="/Users/username/anaconda/bin:$PATH"
I use iterm2 with zsh, although this probably applies to more general cases.
On OSX Sierra with Anaconda3 4.4.0 the path is now:
export PATH="/anaconda/bin:$PATH"
Upvotes: 20