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

pycrtm Installation Error ModuleNotFoundError: No module named 'distutils.msvccompiler' #16

Open
StegmannJCSDA opened this issue Sep 4, 2024 · 4 comments
Assignees
Labels
bug Something is not working

Comments

@StegmannJCSDA
Copy link
Collaborator

Error Description:

Recently I tried to install pycrtm on Ubuntu 22.04.4 using Python 3.10.12 and encountered the following error:

ModuleNotFoundError: No module named 'distutils.msvccompiler'

Attempted Solutions:

The following proposed solutions from here did not fix the problem:

pip3 install setuptools

and

pip3 install --upgrade setuptools
@karpob
Copy link
Collaborator

karpob commented Sep 4, 2024

Fairly bizarre, why does it insist on ms visual c++?

@karpob
Copy link
Collaborator

karpob commented Sep 4, 2024

Maybe force scikit-build to use something sane using --plat-build ?
https://scikit-build.readthedocs.io/en/latest/

@karpob
Copy link
Collaborator

karpob commented Sep 4, 2024

Also maybe, try forcing it to use gcc by setting environment variables CC, CXX, and FC to gcc and gfortran?

@StegmannJCSDA
Copy link
Collaborator Author

It looks like this is because setuptools introduced a breaking change that affects pycrtm.
I found the solution here.
So, downgrading setuptools to version 61 fixed the problem for me:

pip3 install setuptools==61

@StegmannJCSDA StegmannJCSDA self-assigned this Sep 5, 2024
@StegmannJCSDA StegmannJCSDA added the bug Something is not working label Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working
Projects
None yet
Development

No branches or pull requests

2 participants