Skip to content
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

"No module named 'distutils'" with old setuptools on Python 3.12 #139

Closed
diazona opened this issue Dec 13, 2023 · 0 comments · Fixed by #140
Closed

"No module named 'distutils'" with old setuptools on Python 3.12 #139

diazona opened this issue Dec 13, 2023 · 0 comments · Fixed by #140
Assignees
Labels
bug Something isn't working
Milestone

Comments

@diazona
Copy link
Owner

diazona commented Dec 13, 2023

On Python 3.12, when running tests with old versions of setuptools (using --force-dep in tox), specifically version 56, the pre-testing setup fails with this error:

$ tox -r -e py312 --force-dep setuptools==56
[...]
py312: commands[0]> pytest tests/test_classifiers.py
ImportError while loading conftest '/home/diazona/programming/setuptools-pyproject-migration/tests/conftest.py'.
tests/conftest.py:4: in <module>
    import test_support
test_support/test_support/__init__.py:1: in <module>
    import distutils.core
E   ModuleNotFoundError: No module named 'distutils'
py312: exit 4 (0.40 seconds) /home/diazona/programming/setuptools-pyproject-migration> pytest tests/test_classifiers.py pid=31540

Discovered in this example in CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant