Skip to content

ModuleNotFoundError: No module named 'setuptools._distutils' #8775

@knc6

Description

@knc6

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 a 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. Update: This has been fixed on RTD as of Dec 21.
  • If your project does have a 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 your pyproject.toml file. See below for more information.
  • You can temporarily roll back to the old setuptools behavior by exporting a 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.
  • If you were redirected here, it's because you opened a new issue for this exact problem. Please try the solution above first.
  • If it didn't work, leave a comment below with a link to your failing build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions