-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
ModuleNotFoundError: No module named 'setuptools._distutils' #8775
Comments
We're seeing the same problem on PR builds for the pyuvdata package. This is the log: I've done some digging, I think this is caused by setuptools version 60.0 first being installed and then downgraded to version 58.2.0. See these related issues: It seems that this first came up when version 50.0 was released. They fixed it up but then changed it again in 60.0 (with documentation in the changelog). From reading about the issue in 50.0, it seems like this interacts with a bug in pip where the paths get confused when you have one version installed then removed and a different version installed (pypa/setuptools#2353 (comment)). |
Interesting, that seems very likely. I temporarily fixed the issue by getting rid of one of the optional dependencies (phonopy) which was creating the problem. |
Thanks @knc6 for the report and @bhazelton for the help. I have found in your build logs that the line |
This comment has been minimized.
This comment has been minimized.
We also seem to be experiencing this problem: https://readthedocs.org/projects/catalystcoop-pudl/builds/15588383/ |
I see that both catalystcoop-pudl from @zaneselvans and jarvis-tools from @knc6 have the "use system packages" option enabled. For this reason, the second readthedocs.org/readthedocs/doc_builder/python_environments.py Lines 523 to 528 in c3b4bef
I anticipated setuptools breakage in #8711 (and probably it's thanks to it that we aren't seeing dozens of user reports) but I didn't realize that the I'm about to push a fix that hopefully will get deployed soon, but in the meantime, can you test if disabling the "use system packages" option does the trick? And, if you are using it because of some other reason, state why? Alternatively, you can add a |
I checked and we had the "use system packages" option enabled as well, I don't recall why. I unchecked it and re-ran the builds and they passed. So that fixed it for us. Thank you! |
We were using the system packages because we depend on Matplotlib, scipy, numpy, etc. and wanted to avoid installing them from scratch. But turning off system packages seems to have fixed the issue. |
We have the same issue but I cannot see that we added explicitly "use system packages". I also tried Project: oemof/oemof-solph |
@uvchik I think your case is slightly different. Since your project has a
Then, since your The solution in your case is to add the following contents to your
Can you please try it and let us know if it works? |
Added detailed instructions with several methods to fix this issue in the first comment ☝🏽 |
Thank you. Works fine. |
Leaving this issue pinned so folks can easily find it, but we have done our part from the RTD side already to avoid that most projects experience it, so I am closing it. Feel free to continue the conversation here, but remember to read the current status in the first comment before doing so. |
Hello, I do not have a |
Hi,
We use readthedocs for the jarvis-tools package. Recently, I am seeing an error due to setuptools:
Raw log here: https://readthedocs.org/api/v2/build/15584283.txt
I am wondering if somebody can help me with this.
📌 Edit by @astrojuanlu 📌 This issue is triggered by setuptools 60, released on 2021-12-19. Current status:
If your project doesn't have aUpdate: This has been fixed on RTD as of Dec 21.pyproject.toml
, most likely you have the "use system packages" version enabled. You can (1) disable it, (2) cap setuptools yourself in your requirements, or (3) wait for us to deploy a fix (January 2022) . See below for more context.pyproject.toml
, most likely pip is using its fallback mode and installing the problematic setuptools version in an isolated environment. In this case, there is nothing Read the Docs can do to fix your problem. You can do it yourself by adding a proper[build-system]
PEP 518 table to yourpyproject.toml
file. See below for more information.SETUPTOOLS_USE_DISTUTILS=stdlib
environment variable for your project. However, it is not guaranteed that this will work forever, and we encourage you to look into the solution above.The text was updated successfully, but these errors were encountered: