Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip (7.0.0) wheel command with latest setuptools error message lies #2807

Closed
gcarothers opened this issue May 22, 2015 · 14 comments
Closed

pip (7.0.0) wheel command with latest setuptools error message lies #2807

gcarothers opened this issue May 22, 2015 · 14 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@gcarothers
Copy link

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.

@dstufft
Copy link
Member

dstufft commented May 22, 2015

What OS and version of Python? I can't reproduce this locally so there must be something else happening here.

@dstufft
Copy link
Member

dstufft commented May 22, 2015

Ok, so I see two problems here:

  • The wheel created by this is for the pip-test project, but you're specifying an #egg=fake name to tell it that it's actually fake. 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.

@dstufft
Copy link
Member

dstufft commented May 22, 2015

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.

@gcarothers
Copy link
Author

OS: Debian 7 (wheezy)
Python: Python 2.7.3
... ah, this is inside a virtualenv

@dstufft
Copy link
Member

dstufft commented May 22, 2015

What happens if you open up python and try to do import pkg_resources? If that works, does it have an attribute named DistInfoDistribution.

@gcarothers
Copy link
Author

Very confused now, after downgrading and upgrading back to current pip and setuptools works fine.

@gcarothers
Copy link
Author

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)

@gcarothers
Copy link
Author

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.

@rbtcollins
Copy link

@dstufft removed the shims for that AIUI - perhaps we were too optimistic about the death of old things.

@qwcode
Copy link
Contributor

qwcode commented May 25, 2015

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)

@gcarothers
Copy link
Author

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.

@rbtcollins
Copy link

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?

@gcarothers
Copy link
Author

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.

@dstufft
Copy link
Member

dstufft commented Mar 22, 2017

Closing this as it seems to require an ancient version of distribute and Debian to trigger.

@dstufft dstufft closed this as completed Mar 22, 2017
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

No branches or pull requests

4 participants