Pip looks for the wrong directory after installing Anaconda

When I write 'pip' in the terminal, I get the following error:

-bash: /usr/local/bin/pip: /usr/local/opt/python3/bin/python3.5: bad interpreter: No such file or directory 

I recently installed the Anaconda package for Mac using the standard installer on the website, which I think is what got confused.

I had Python 3.6 installed via homebrew as well as pip. I noticed that if my path includes export PATH="//anaconda/bin:$PATH" , then pip works fine. However, when I remove this line from my bash profile (some of the packages I work with have errors with anaconda python), I get the error as above.

For some reason, pip is looking for Python 3.5 when I have 3.6 installed (for anaconda and homebrew). Before installing, the anaconda worked perfectly. Note that pip is actually located in /usr/local/bin/pip .

Any ideas appreciated!

+5
source share

Source: https://habr.com/ru/post/1264401/


All Articles