-
Notifications
You must be signed in to change notification settings - Fork 67
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
setuptools 50 breaks pip installation on Debian/Ubuntu #17
Comments
What you're seeing is pypa/setuptools#2232 which has been re-introduced, mentioned pypa/setuptools@04e3df2 In short, packaged Debian/ubuntu Python installs things into Now setuptools vendors distutils this and always installs things into Another consequence is the binary location, which moved from |
Another consequence of this is broken development installations on Ubuntu ( |
There's a long and painful discussion on the setuptools issues list (I count 9 issues raised the day after the release). This is all to do with how Debian/Ubuntu installs stuff with pip. There's an "official" workaround that involves setting things in your environment, but that looks a bit fiddly with the Azure pipelines stuff and this has been such a disaster that I'm pretty certain the setuptools maintainers will release something more sensible soon. See e.g. https://github.com/pypa/setuptools/issues/2350#issuecomment-683512526 for a careful description of what's going on.
There's a long and painful discussion on the setuptools issues list (I count 9 issues raised the day after the release). This is all to do with how Debian/Ubuntu installs stuff with pip. There's an "official" workaround that involves setting things in your environment, but that looks a bit fiddly with the Azure pipelines stuff and this has been such a disaster that I'm pretty certain the setuptools maintainers will release something more sensible soon. See e.g. https://github.com/pypa/setuptools/issues/2350#issuecomment-683512526 for a careful description of what's going on.
There's a long and painful discussion on the setuptools issues list (I count 9 issues raised the day after the release). This is all to do with how Debian/Ubuntu installs stuff with pip. There's an "official" workaround that involves setting things in your environment, but that looks a bit fiddly with the Azure pipelines stuff and this has been such a disaster that I'm pretty certain the setuptools maintainers will release something more sensible soon. See e.g. https://github.com/pypa/setuptools/issues/2350#issuecomment-683512526 for a careful description of what's going on.
There's a long and painful discussion on the setuptools issues list (I count 9 issues raised the day after the release). This is all to do with how Debian/Ubuntu installs stuff with pip. There's an "official" workaround that involves setting things in your environment, but that looks a bit fiddly with the Azure pipelines stuff and this has been such a disaster that I'm pretty certain the setuptools maintainers will release something more sensible soon. See e.g. https://github.com/pypa/setuptools/issues/2350#issuecomment-683512526 for a careful description of what's going on. Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
There's a long and painful discussion on the setuptools issues list (I count 9 issues raised the day after the release). This is all to do with how Debian/Ubuntu installs stuff with pip. There's an "official" workaround that involves setting things in your environment, but that looks a bit fiddly with the Azure pipelines stuff and this has been such a disaster that I'm pretty certain the setuptools maintainers will release something more sensible soon. See e.g. https://github.com/pypa/setuptools/issues/2350#issuecomment-683512526 for a careful description of what's going on. Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
I think it's all related; if you hit the inbuilt It is confusing however; if you just do |
…ching (#16) The issue has been affecting many people today https://github.com/pypa/setuptools/issues/2350 This seems to be the fix to unblock us from deploying without having to modify a bunch of source files across repos. To override this value, a project can set this env var in its own buildspec.yml. Tested by deploying from local, also tested with ops-service-cluster in QA: https://r0p115rf9k.execute-api.us-east-1.amazonaws.com/newqa/deploy/build?arn=arn:aws:codebuild:us-east-1:200595175417:build/ops-service-cluster:641d3471-92d1-4000-a41b-8503ca5d4844
Quoting the changelog entry, for the relevant change:
Please see pypa/setuptools#2232 for the relevant discussion on this. |
Note that this affects other distros than just Ubuntu/Debian. It seems that |
As a minimal reproduction based on the comment here: pypa/setuptools#2356 (comment)
|
This is a common issue in debian-based distributions; debian also re-packages ruby, causing newcomers to complain on IRC about default assumptions (made via the path) not working, thus outsourcing their problems to e. g. the IRC crowd who then have to try to fix it (and typically recommend using package version managers to just avoid the debian-hassle, rather than e. g. apt-get something). While I think debian's way to handle this is really really bad, I also think that ultimately tools should be flexible enough to support this weird splitting-of-packages that debian uses. |
I recognize that this issue is serious and needs addressing. Here are the possible options in my order of descending preference:
Are there other options? Are there Debian maintainers here who can help advise/discuss? |
Looks like @doko42 is a maintainer for distutils (and setuptools) on Debian: can you help with the above? |
I am not a Debian maintainer, but looking at their patch, their needs are the same as in Fedora (and PyPy, too): that is, defining and selecting install schemes. Unfortunately, on today's systems that customize |
I believe @kitterma is also involved in Debian's Python. :) |
FYI, this doesn't only affect Debian. The AWS lambdas running Python were also broken. |
If this means "undo the changes in 50.0 and release 51.0 which behaves like 49.latest worked" then I think that might be the preference of the vast majority of the community that uses In this thread you can see just a snapshot of the work being generated right now, just in the open-source community on GitHub, and it's jarring. People are pinning Add this to all of the community who have adopted Docker containers and there will be weeks of people discovering the various open issues on I would add an argument about how now would be the perfect time for CVEs in pre-setuptools 50.0 to drop but I'm only security conscious enough to know it would be bad so I'll leave the speculation for someone more intelligent than I am there. It may be your least preferred option but from the point of view of myself, and I reckon much of the Python-using community, it's the only option you should be considering given the widespread effects of this issue. /2c, and I meant every word from a place of good faith. "don't break userland" should apply to more things than the Linux kernel |
I'm convinced the behavior needs to be suppressed for now. I was hoping we could work through the impacts and push through this time (based on the fallout from the Setuptools 48 release being much less severe). |
Setuptools 50.1.0 changes contains pypa/setuptools#2376, which changes the default to be more conservative. |
This is to avoid the issues introduced by setuptools==50.0.0 on Ubuntu/Debian platforms (see https://github.com/pypa/setuptools/issues/2350). PiperOrigin-RevId: 329511139
Closing as a duplicate of #2. |
The issue appears when doing 'pip install -e <package>', the package does not show up when doing 'pip freeze'. This is caused by Ubuntu installing a patched version of distutils (see pypa/distutils/issues/17 and pypa/setuptools/issues/3301; see also pypa/setuptools/issues/3625 for when this will stop working). This adds a workaround. Better would be to create a virtualenv and install into that and be insulated from odd OS upstream choices.
On newly created Ubuntu 16.04 AWS instances, we started seeing that
python3.6 -m pip
no longer works afterget-pip.py
(version 19.3.1). get-pip puts pip in/usr/lib/python3.6/site-packages/pip-20.2.2.dist-info
, but sys.path for our 3.6 executable is['', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages']
.On a newly created box I was able to confirm that using
SETUPTOOLS_USE_DISTUTILS=stdlib
fixes the problem:Sorry this isn't a completely self-contained repro case for the bug; hopefully this is enough information to figure out what's going on.
The text was updated successfully, but these errors were encountered: