-
Notifications
You must be signed in to change notification settings - Fork 3k
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 fail after upgrade to 1.5.5 #1800
Comments
Hmm, for some reason your |
@dstufft don't work.
Maybe it is a bug on homebrew install =/. What's your opinion about it?
|
What happens if you do |
Before upgrade:
After upgrade:
|
Either your pythons and paths are horribly messed up, or this might just be an old distribute/setuptools blowup. Try these:
|
Does pip try to check/upgrade the setuptools version to avoid these situations? |
Not work. I don't known why, but the
|
I think Upgrade setuptools and pip Pull Request #29039 probably solves this issue. A similar pip 1.5.4 to 1.5.5 problem is at the root of /homebrew/python issue #26900 |
@wem3 The Pull Request Homebrew/legacy-homebrew#29039 was merged. Thanks for the attention, guys! |
I see
However I'm not sure what causes these scripts to not be updated when upgrading given distribution/package. |
To provide a bit more information, Homebrew's version of Python currently bundles setuptools 3.6; before yesterday it provided setuptools 3.4.1. I can confirm that setuptools 3.6 does not fix this problem, and it does occur even if no other setuptools/distutils installations are present. I've noticed this only happens when pip tries to upgrade itself by downloading a wheel (which is the default); I can provide more information if needed. |
I can also see two separate @mistydemeo pip provides a
It lists the files installed by pip for a package. If you compare those between pip install between |
The contents are identical between the working and non-working (non-wheel and wheel) installs; even the checksums of the files are identical. |
Well, damn. @mistydemeo thanks for trying that! fwiw the reason to manually look up the I'd still consider a possibility of @robsonpeixoto is that his installation seems to have gathered two
and
I'm not sure if this is caused from homebrew workings or what. Leftover files in there might also be a problem. Having multiple It seems weird to me that even though |
One of the two site-packages directories is actually just a symlink: they're the same directory. Homebrew's python is only configured to use one |
To explain the symlink structure: Homebrew installs software to private versioned directories within |
Homebrew download pip tarball and execute setup.py. Installing from setup.py makes versioned script. |
For more detail:
|
When using
|
What is the correct behavior when file exists while installing script?
FYI, |
I just encountered this issue on Ubuntu 12.04 LTS with python3.4, when attempting to upgrade I worked around the issue by manually editing |
12.04? Not 14.04? |
Yep. See https://launchpad.net/~fkrull/+archive/ubuntu/deadsnakes FWIW, I'm not using any packages through the official Ubuntu repos (everything was installed with |
OK, I see. Homebrew and deadsnakes may cause same problem with different ways. The bugfix for homebrew is merged but not released yet. |
Isn't the |
Not really - https://en.wikipedia.org/wiki/Wheel_(Unix_term) IIRC it's most often seen in debian, where sudo users belong to it. In this case though, |
@fake-name OK, It's a different problem from Homebrew. |
@Ivoz Thank you very much!! Your instructions totally fixed my broken pip. |
I just had this problem on Ubuntu 14.04 LTS after upgrading pip through pip. Looked like this: user@ubuntu_14_04_LTS:~$ pip
Traceback (most recent call last):
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2749, in <module>
working_set = WorkingSet._build_master()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 444, in _build_master
ws.require(__requires__)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 725, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 628, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pip==1.5.6
After trying uninstalling both via pip and apt-get without ACTUALLY getting rid off it, I tracked down a file called pip (through which pip) in /usr/local/bin which contained the following script: user@ubuntu_14_04_LTS:/usr/local/bin$ cat pip
#!/usr/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==1.5.6','console_scripts','pip'
__requires__ = 'pip==1.5.6'
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.exit(
load_entry_point('pip==1.5.6', 'console_scripts', 'pip')()
) I just deleted this file and reinstalled with apt-get. Works now. |
@gzur thanks, it works for me! |
Using a python installed by homebrew.
The text was updated successfully, but these errors were encountered: