Closed
Description
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:
- Pip encounters the requirement to upgrade setuptools, downloads the wheel.
- Pip downloads sdists for other packages to be built and installed.
- Pip uninstalls setuptools.
- Pip attempts to build other package but setuptools isn't yet fully installed (its dependencies are missing).
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.