Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Latest 'pip' fails with "requires setuptools >= 0.8 for dist-info"

Using the recent (1.5) version of pip, I get an error when attempting to update several packages. For example, sudo pip install -U pytz results in failure with:

Wheel installs require setuptools >= 0.8 for dist-info support.
pip's wheel support requires setuptools >= 0.8 for dist-info support.

I don't understand this message (I have setuptools 2.1) or what to do about it.


Exception information from the log for this error:

Exception information:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 230, in run
    finder = self._build_package_finder(options, index_urls, session)
  File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 185, in _build_package_finder
    session=session,
  File "/Library/Python/2.7/site-packages/pip/index.py", line 50, in __init__
    self.use_wheel = use_wheel
  File "/Library/Python/2.7/site-packages/pip/index.py", line 89, in use_wheel
    raise InstallationError("pip's wheel support requires setuptools >= 0.8 for dist-info support.")
InstallationError: pip's wheel support requires setuptools >= 0.8 for dist-info support.
like image 813
orome Avatar asked Jan 03 '14 14:01

orome


People also ask

Does pip depend on setuptools?

All users who install pip will get setuptools by default. Users cannot explicitly uninstall setuptools after installing pip nor exclude setuptools when installing pip. Users might op-out from installing Recommended packages by default to save space, and such users will still get setuptools with pip.

What is pip setuptools?

Setuptools is the Python Packaging Authority (PyPA) package development process library and utility for building Python projects based on packages and their dependencies listed in a setup.py script.


2 Answers

This worked for me:

sudo pip install setuptools --no-use-wheel --upgrade

Note it's usage of sudo

UPDATE

On Windows you just need to execute pip install setuptools --no-use-wheel --upgrade as an administrator. In Unix/Linux, the sudo command is for elevating permissions.

UPDATE 2

This appears to have been fixed in 1.5.1.

like image 160
Rolandf Avatar answered Oct 14 '22 00:10

Rolandf


First, you should never run 'sudo pip'.

If possible you should use your system package manager because it uses GPG signatures to ensure you're not running malicious code.

Otherwise, try upgrading setuptools:

easy_install -U setuptools

Alternatively, try:

pip install --user <somepackage>

This is of course for "global" packages. You should ideally be using virtualenvs.

like image 11
user1503941 Avatar answered Oct 14 '22 01:10

user1503941