I've somehow messed up my python installation, while trying to update to Ubuntu 19.04 from 18.10.

The python command points to my anaconda's python instead of /usr/bin/python.

> which python


--> echo $PATH


cat .bashrc | grep anaconda
__conda_setup="$(CONDA_REPORT_ERRORS=false '/home/username/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
    if [ -f "/home/username/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/home/username/anaconda3/etc/profile.d/conda.sh"
        \export PATH="/home/username/anaconda3/bin:$PATH"

cat .bashrc | grep python

cat .bashrc | grep PATH
export PATH=/usr/local/cuda-9.0/bin${PATH:+:$PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
        \export PATH="/home/username/anaconda3/bin:$PATH"

  • What is your $PATH? – Renan Apr 30 at 12:05
  • Oh wow, I've actually thought I've added it. I've just edited my question. – Lados Apr 30 at 12:08

Change your $PATH to put the system directories (/usr/bin, /bin etc...) before your Anaconda install. Probably it's set somewhere in your .bashrc.

  • I've just edited my question adding with the output of my bashr grepping anaconda – Lados Apr 30 at 12:40
  • 1
    removing the anaconda script in .bashrc fixed it – Lados Apr 30 at 12:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.