-
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
Concurrent upgrade of setuptools and other sdist packages fails #4253
Comments
I think it's relevant to note that the error results in a broken installation of pip3:
|
@cromulus: Edit: on second thought, perhaps you're right that the failed pip operation does leave the environment in a broken state. |
What I wonder is why is it that all of the uninstalls/installs done in a single, atomic operation. In other words, why aren't the builds all done before setuptools gets uninstalled? |
Oh, so is this a non-issue then if you're using a modern version of pip? |
Yes, that's right. The topological sorting means that setuptools' dependencies are installed before setuptools is, so even when setuptools is upgraded, it's in a viable state. |
pip<6.1 + setuptools>=34 have a problem with packages that try to update setuptools during installation, like cryptography. See pypa/pip#4253. The Ubuntu 14.04 package versions are pip 1.5.4 and setuptools 3.3. When we install cryptography under those versions, it tries to update setuptools to version 34, which became available about 10 days ago, and then pip gets permanently broken with errors like "ImportError: No module named 'packaging'". The easiest work-around on systems that aren't already broken is to upgrade pip and setuptools individually before we install any package that tries to update setuptools. Also try to detect a broken system and forcibly remove setuptools first before trying to install/upgrade pip. fixes #1080, fixes #1081, fixes #1086 see #1083 see https://discourse.mailinabox.email/t/error-with-pip-and-python/1880 see https://discourse.mailinabox.email/t/error-installing-mib/1875
Beginning with Setuptools 34 (pypa/setuptools#581), there's a bit of a race condition when setuptools is being upgraded as part of a larger install operation. Users have reported here's what happens:
Here's a build where the issue occurs.
I believe when #4144 lands, pip can create an implied dependency of setuptools on every package to provide compatibility with the prior expectation.
In the interim, packages and environments affected should pin to an old version of setuptools or (preferably) upgrade setuptools in a separate step prior to upgrading other packages. See python-excel/xlrd#194 for an example.
The text was updated successfully, but these errors were encountered: