Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pip suddenly using wrong version of Python

Tags:

People also ask

Why is pip installing old version?

For example, you may need to install an older version of a package if the package has changed in a way that is not compatible with the version of Python you have installed, with other packages that you have installed, or with your Python code.

Which Python is pip linked to?

On Windows, you can execute the pip module using a given Python version through the Python launcher, py.exe , if you chose to install it during Python 3 setup.

How do I update pip to latest version of Python?

Updating Pip b is available.” You can run “pip install --upgrade pip” to install and use the new version of pip. To update pip2 or pip3 using this command, only replace the first pip with the pip version.


Having a weird problem with pip on os x.

As far as I can recall (and a quick look at my .bash_history seems to confirm) I have not made any recent changes to my configuration. Alas, the pip command seems to be suddenly using a different version of python than it was previously. Up until now I was using the command pip to manage my python2 libraries and pip3 to manage by python3 libraries. Suddenly, any attempts at running pip install fails with errors like missing parenthesis around print statements.

Here is the result of a few commands I attempted to figure out the problem:

which pip > /usr/local/bin/pip  which pip3 > /usr/local/bin/pip3  which python > /usr/local/bin/python  python version > Python 2.7.11  pip --version > pip 8.1.1 from /usr/local/lib/python3.5/site-packages (python 3.5) 

So for some reason the pip command seems to be running from the PyPi2 database but in python3 now? Any ideas how to fix this?