Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip install --upgrade pip installs the same version

Somehow pip --upgrade doesn't upgrade any packages.

I'm on OSX El Capitan (10.11.3) and installed python using brew install python

Python: /usr/local/bin/python@ -> ../Cellar/python/2.7.11/bin/python
Pip: /usr/local/bin/pip@ -> ../Cellar/python/2.7.11/bin/pip

After successful install I run pip install --upgrade pip.

Full output:

$ pip install --upgrade pip
Collecting pip
  Using cached pip-8.1.0-py2.py3-none-any.whl
Installing collected packages: pip
Successfully installed pip-8.0.2
You are using pip version 8.0.2, however version 8.1.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Why doesn't pip install the new version?

Update

I think it has something to do with my ~/.pydistutils.cfg file which fixes the DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both error when running pip. I followed these instructions

Related SO question

like image 302
Sander van Leeuwen Avatar asked Mar 15 '16 13:03

Sander van Leeuwen


People also ask

What does pip install -- upgrade do?

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.

How do I update pip to a specific version?

Upgrade Or Downgrade To Specific Pip Version If you want to upgrade or downgrade your version of pip to a specific version on a Mac, you can do this by adding a pip==<version> flag to the end of your update command.

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.

Does pip install always install latest version?

The pip install command always installs the latest published version of a package, but sometimes your code requires a specific package version to work correctly.


1 Answers

$ sudo pip install -U pip
Collecting pip
Downloading pip-9.0.3-py2.py3-none-any.whl (1.4MB)
100% |████████████████████████████████| 1.4MB 335kB/s 
Installing collected packages: pip
Found existing installation: pip 9.0.1
Uninstalling pip-9.0.1:
  Successfully uninstalled pip-9.0.1
Successfully installed pip-9.0.3
like image 108
Astrophe Avatar answered Nov 15 '22 01:11

Astrophe