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

ModuleNotFoundError: No module named 'distutils' #494

Open
temuller opened this issue Jan 25, 2024 · 1 comment
Open

ModuleNotFoundError: No module named 'distutils' #494

temuller opened this issue Jan 25, 2024 · 1 comment

Comments

@temuller
Copy link

It seems that starting from Python 12, distutils is not supported anymore:

Read What’s New In Python 3.12:

  • PEP 632: Remove the distutils package. See the migration guide for advice replacing the APIs it provided. The third-party Setuptools package continues to provide distutils, if you still require it in Python 3.12 and beyond.
    

Because of this, I get an error every time I import aplpy. Could you fix this, please?

@temuller
Copy link
Author

Sorry, I should have described the issue better. I am currently running Github actions to test my code, but I get the following error:

/opt/hostedtoolcache/Python/3.12.1/x64/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_local_phot.py:3: in <module>
    from hostphot.cutouts import download_images
/opt/hostedtoolcache/Python/3.12.1/x64/lib/python3.12/site-packages/hostphot/__init__.py:3: in <module>
    from . import utils
/opt/hostedtoolcache/Python/3.12.1/x64/lib/python3.12/site-packages/hostphot/utils.py:10: in <module>
    import aplpy
/opt/hostedtoolcache/Python/3.12.1/x64/lib/python3.12/site-packages/aplpy/__init__.py:14: in <module>
    from .core import FITSFigure  # noqa
/opt/hostedtoolcache/Python/3.12.1/x64/lib/python3.12/site-packages/aplpy/core.py:1: in <module>
    from distutils import version
E   ModuleNotFoundError: No module named 'distutils'

smaret added a commit to smaret/aplpy that referenced this issue Mar 22, 2024
This fixes the build on Python 3.12. Closes aplpy#494.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant