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

Python 3.12: ModuleNotFoundError: No module named 'distutils' #22

Open
hugovk opened this issue Dec 31, 2023 · 0 comments · May be fixed by #19 or #23
Open

Python 3.12: ModuleNotFoundError: No module named 'distutils' #22

hugovk opened this issue Dec 31, 2023 · 0 comments · May be fixed by #19 or #23

Comments

@hugovk
Copy link

hugovk commented Dec 31, 2023

With Python 3.12:

Python 3.12.1 (v3.12.1:2305ca5144, Dec  7 2023, 17:23:38) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import calmap
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/calmap/__init__.py", line 18, in <module>
    from distutils.version import StrictVersion
ModuleNotFoundError: No module named 'distutils'

This is because distutils is no longer part of Python from 3.12 onwards:

A workaround is to install Setuptools, but the recommended advice to to replace distutils.version with the modern packaging.version API:

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