I am running Ubuntu 19.10 on my laptop, I recently installed miniconda3. No problems this far, but after creating an environment with python 2.7 I get the following message every time I open a terminal:
Command 'python' not found, but can be installed with:
sudo apt install python3 # version 3.7.5-1, or
sudo apt install python # version 2.7.17-1
sudo apt install python-minimal # version 2.7.17-1
So I followed the advise and installed python, then this error occured:
Traceback (most recent call last):
File "<stdin>", line 3, in <module>
ImportError: No module named conda
My guess is that bash is trying to access the conda python 2.7?
Here is what I get by running which python
without conda active:
which python
/usr/bin/python
which python3
/usr/bin/python3
whereis python
python: /usr/bin/python2.7 /usr/bin/python3.7 /usr/bin/python3.7m /usr/bin/python /usr/lib/python3.8 /usr/lib/python2.7 /usr/lib/python3.7 /etc/python2.7 /etc/python3.7 /etc/python /usr/local/lib/python2.7 /usr/local/lib/python3.7 /usr/include/python3.7m /usr/share/python /usr/share/man/man1/python.1.gz
with conda activated here are the corresponding results:
which python
/home/rustax/miniconda3/bin/python
which python3
/home/rustax/miniconda3/bin/python3
whereis python
python: /usr/bin/python2.7 /usr/bin/python3.7 /usr/bin/python3.7m /usr/bin/python /usr/lib/python3.8 /usr/lib/python2.7 /usr/lib/python3.7 /etc/python2.7 /etc/python3.7 /etc/python /usr/local/lib/python2.7 /usr/local/lib/python3.7 /usr/include/python3.7m /usr/share/python /home/rustax/miniconda3/bin/python3.7-config /home/rustax/miniconda3/bin/python3.7m /home/rustax/miniconda3/bin/python3.7 /home/rustax/miniconda3/bin/python3.7m-config /home/rustax/miniconda3/bin/python /usr/share/man/man1/python.1.gz
I tried creating a symbolic link from /home/rustax/miniconda3/bin/python to /usr/bin/python but the same error appeared.
Conda adds the following lines to .bashrc:
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/rustax/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/rustax/miniconda3/etc/profile.d/conda.sh" ]; then
. "/home/rustax/miniconda3/etc/profile.d/conda.sh"
else
export PATH="/home/rustax/miniconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
Thank you in advance for any help you can provide