I installed Conda at a different location than the default location on Ubuntu 16.4 using the official installation helper.
Now conda create
and source activate
works, but source deactivate
gives me the error:
(deep) yuqiong@yuqiong-G7-7588:/media/yuqiong/DATA$ source deactivate
bash: deactivate: No such file or directory
I checked this issue on Github: #458: "Using source deactivate
on a conda env fails unless the root anaconda directory is in PATH". It seems to be related, but I do not understand what happens when I run source deactivate
inside a conda environment. Is it because something is wrong with my PATH variables?
Here is the part of my /.bashrc
related to Conda, if helpful.
Thanks so much for your help!
# added by Anaconda3 5.3.1 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/media/yuqiong/DATA/Anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
\eval "$__conda_setup"
else
if [ -f "/media/yuqiong/DATA/Anaconda3/etc/profile.d/conda.sh" ]; then
. "/media/yuqiong/DATA/Anaconda3/etc/profile.d/conda.sh"
CONDA_CHANGEPS1=false conda activate base
else
\export PATH="/media/yuqiong/DATA/Anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda init <<<
### conda shortcuts
function actv() {
#do things with parameters like $1 such as
source activate "$1"
}
So I still have not figured out why source deactivate
does not work anymore, but the good thing is conda deactivate
works. I'm sticking with that now.
And I think the problem is I do not understand how conda works... Here is a gentle intro to package manager if anyone's interested...https://medium.com/@sdboyer/so-you-want-to-write-a-package-manager-4ae9c17d9527
Use
conda deactivate
To deactivate or to go to the base source and then you can use
conda info --envs
to get the list of available sources
source activate <source_name>
and to activate a particular source.
Refer this for more -> Managing environments - conda.io
Just Put
conda deactivate
good to know
conda activate and conda deactivate only work on conda 4.6 and later versions
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With