bash - Conda env activation: Weird "must be sourced" error -


i trying run following:

source activate env-name 

but receiving error tells me call activate must sourced. in conda activate script, there's if block near beginning tests "$(basename "$0")", whether it's equal activate, in case raise exception i'm referring to. little bit of fiddling script (i.e., echo $0; return 1) , found out indeed think 0th argument passing in activate rather source. perplexing because know command includes source in , that should 0th argument. i'm not sure else there do. have clues?

in case it's important, using zsh default shell , seems activate script bash script, don't think should matter (it doesn't elsewhere me, in specific environment on work laptop). able around whole thing commenting out whole check (and couple of other minor changes), i'd rather not have in particular case.

i've been having same issue, workaround i've found is:

source <path anaconda>/anaconda3/bin/activate <env name> 

edit: adding line:

export path=$path:<path anaconda>/anaconda3/bin:$path 

to bashrc (or zsh etc) add source path , able use source normal.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -