pip (7.0.0) wheel command with latest setuptools error message lies
pip install --upgrade 'pip>=1.4.1'
Requirement already up-to-date: pip>=1.4.1 in /home/lex/lib/python2.7/site-packages
pip install --upgrade 'setuptools>=0.8'
Requirement already up-to-date: setuptools>=0.8 in /home/lex/lib/python2.7/site-packages
pip install wheel
Requirement already satisfied (use --upgrade to upgrade): wheel in /home/lex/lib/python2.7/site-packages
pip wheel -w wheelhouse -f wheelhouse -r requirements.txt
ERROR: 'pip wheel' requires setuptools >= 0.8 for dist-info support. To fix this, run: pip install --upgrade setuptools
Down grading back to pip==6.1.1 and setuptools==15.2 works perfectly fine.
What OS and version of Python? I can't reproduce this locally so there must be something else happening here.
Ok, so I see two problems here:
- The wheel created by this is for the
pip-testproject, but you're specifying an#egg=fakename to tell it that it's actuallyfake. This is what's causing the error when It's trying to install it, however this case shouldn't be able to be reached because... - We're building a wheel for something that comes from VCS, we should only be doing that if it comes from a real package and not from VCSs.
Adding @rbtcollins because he wrote this feature and might have a better idea of why it's happening. I'm going to poke at it now though.
OS: Debian 7 (wheezy) Python: Python 2.7.3 ... ah, this is inside a virtualenv
What happens if you open up python and try to do import pkg_resources? If that works, does it have an attribute named DistInfoDistribution.
Very confused now, after downgrading and upgrading back to current pip and setuptools works fine.
ERROR: 'pip wheel' requires setuptools >= 0.8 for dist-info support. To fix this, run: pip install --upgrade setuptools
make: *** [install-wheelhouse] Error 1
(test)gavin@perms:/home/lex/src/deus_lex$ python
Python 2.7.3 (default, Mar 13 2014, 11:03:55)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pkg_resources
>>> pkg_resources.DistInfoDistribution
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'DistInfoDistribution'
>>>
Virtualenv details:
/usr/bin/virtualenv --version
1.7.1.2
virtualenv creation pip
pip 1.1 from /home/gavin/test2/lib/python2.7/site-packages/pip-1.1-py2.7.egg (python 2.7)
So the issue seems to be a lingering distribute-0.6.24 that isn't being uninstalled any more. Prior versions of pip and setuptools correctly removed distribute-0.6.24 but the current versions do not.
@dstufft removed the shims for that AIUI - perhaps we were too optimistic about the death of old things.
wheezy is supported thru 2018. it would be hard to maintain the distribute-to-setuptools hacks for that long.
I think the simplest thing is to do a "source install" of the latest virtualenv (see https://virtualenv.pypa.io/en/latest/installation.html#installation), and go from there. don't try to bootstrap from the system version of virtualenv. that way, you'd have the latest pip and setuptools in your virtualenv, and no distribute to upgrade.
another possible route would be to use debian backports, but it seems nobody is maintaining backports for pip/setuptools/virtualenv (at least for wheezy)
The other possible route getting a newer virtualenv into wheezy backports runs into a rather annoying issue. Turns out the current jessie/sid virtualenv package does not in fact use virtualenv_support and instead is patched to use /usr/share/python-wheels/ this makes it very hard to create a backported virtualenv without replacing lots of machinery in wheezy.
If there isn't support for maintaining the distribute-to-setuptools hacks it seems at least worth while to have an error message that gives someone an idea of what's going on.
I agree; Personally I think we should reinstate it, but warning would be better than nothing. I've seen what 3 distribute related new bugs in the last couple weeks?
For reference wheezy is NOT fully supported till 2018 just till February 2016. After that it will no longer get updates from the Debian security team. Volunteer LTS support is planned.
Closing this as it seems to require an ancient version of distribute and Debian to trigger.