-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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 install virtualenv broken / missing zipp package #1630
Comments
The same commands work if I change Ubuntu's version number to 18.04 |
So I got some help on IRC, Still, this would be great to either:
|
We've just today improved on this with #1628; though just trying it seems this gets you to:
As the zipp packages can't work with setuptools 41.0.0... |
setuptools 42.0.0 works though in this case 👍 |
this isn't a bug in virtualenv, if you it's a combination of two things:
so you end up with:
the easiest fix is to use a newer version of |
@gaborbernat I don't think this is virtualenv itself, since a |
Yeah, it's not itself; but our users are hit with this; I'm tempted to bump https://github.com/pypa/virtualenv/blob/master/setup.py#L4 to 42... which seems to solve it. |
that code doesn't run at all when installed from a wheel |
From a user point of view, the best would be an error message saying something like: "Unsupported pip version, please run 'pip install -U pip' first". |
In case of a wheel installation, we can't do anything, the issue is already past us. If someone is installing from the source than they don't necessarily need newer pip, just newer setuptools. If they have newer setuptools we can fail with something more helpful. This is the best we can do here I believe. |
You could even display that at runtime. It should simply display an error message when run on very old pip versions. |
@gaborbernat that doesn't help though, pip will still install a version of $ virtualenv venv -ppython2
Running virtualenv with interpreter /usr/bin/python2
Already using interpreter /usr/bin/python2
New python executable in /tmp/y/venv/bin/python2
Also creating executable in /tmp/y/venv/bin/python
Installing setuptools, pip, wheel...
done.
$ . venv/bin/activate
$ pip install 'pip<9' 'setuptools>=42'
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting pip<9
Using cached pip-8.1.2-py2.py3-none-any.whl (1.2 MB)
Requirement already satisfied: setuptools>=42 in ./venv/lib/python2.7/site-packages (44.0.0)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 20.0.2
Uninstalling pip-20.0.2:
Successfully uninstalled pip-20.0.2
Successfully installed pip-8.1.2
$ pip install zipp
Collecting zipp
Downloading https://files.pythonhosted.org/packages/60/85/668bca4a9ef474ca634c993e768f12bd99af1f06bb90bb2655bc538a967e/zipp-2.2.0.tar.gz
Building wheels for collected packages: zipp
Running setup.py bdist_wheel for zipp ... done
Stored in directory: /home/asottile/.cache/pip/wheels/a0/1f/9d/d132b3fbc38b33322681e3a7830c0a29fce7f55c3a06b85c65
Successfully built zipp
Installing collected packages: zipp
Successfully installed zipp-2.2.0
You are using pip version 8.1.2, however version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command. |
Thinking this through I don't think we can do anything here. If it's already installed the only way we would know if our dependencies are correct is to manually check... and that's very expensive. |
Given that pip already produces a warning (which I notice you disabled in the docker script) when you use an older version, suggesting that you upgrade, would adding another message telling you that you are on an out of date version actually help? (That's not a rhetorical or sarcastic question - one of the big problems with Python packaging is that whenever we introduce new standards, older versions of the tools don't support them, and we need to find the best way to encourage users to keep up to date. So knowing what is and isn't working in how we try to get the message out to users is really important to us). |
Where? I see all the warnings, Python 2.7 EOL, etc. Anyway, maybe the best thing we could do is to have this here for Google, at least now it finds this issue for "ImportError: No module named zipp" so people can find the pip update fix. |
|
That's needed in Dockerfile to avoid caching. I was thinking of some kind of Warning like the 2.7 EOL red lines, those are very visible. |
So I tried without it, and it just shows that meaningless.
line. Of course everyone disables this in Dockerfiles as this is always displayed, even as a soon as 20.0.3 will be released. |
Not sure why this didn't fail locally except that perhaps old docker build images were out of date somehow, but basically fixed the problem by updating pip first before installing virtualenv as per pypa/virtualenv#1630 CTR
A combination of a few python packaging/installing tool issues has led to the cloudwatch logs agent install process breaking. A bit of detail here: pypa/virtualenv#1630 (comment)
A combination of a few python packaging/installing tool issues has led to the cloudwatch logs agent install process breaking. A bit of detail here: pypa/virtualenv#1630 (comment)
A combination of a few python packaging/installing tool issues has led to the cloudwatch logs agent install process breaking. A bit of detail here: pypa/virtualenv#1630 (comment)
A combination of a few python packaging/installing tool issues has led to the cloudwatch logs agent install process breaking. A bit of detail here: pypa/virtualenv#1630 (comment)
Still getting this issue, despite being on the latest version of pip:
Similar errors even if I've |
|
Various guides (including this one) claim that it's a fix to this problem (whereby |
yikes, definitely don't follow their advice in your case you're doing a the first installation should have warned you about this (you can probably get the messaging again with |
Hmmm, interesting. So it turns out there's already a file a
Note it's hard-coding to 2.7 in the shebang, which is probably the source of some of the issues, since I'm install with I had to make sure to add that path (which you guessed correctly - and which was also output from |
I'd suggest uninstalling that one, but lol, |
Thanks for submitting an issue!
If submitting a BUG please provide:
-vvv --with-traceback
flags includedpip list
of the environment where virtualenv is installed into if not using the zipappI've created a minimal reproducible Dockerfile, it's self explanatory:
Full install log:
The text was updated successfully, but these errors were encountered: