0

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
/home/username/anaconda3/bin/python

My $PATH:

--> echo $PATH
/home/username/.nvm/versions/node/v11.13.0/bin:/home/username/anaconda3/bin:/home/username/anaconda3/condabin:/usr/local/cuda-9.0/bin:/home/username/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin}

.bashrc:

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
nothing

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
0

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.