Skip to content

Got ModuleNotFoundError: No module named 'cmake' when building on windows #1901

Closed Answered by henryiii
1yefuwang1 asked this question in Q&A
Discussion options

You must be logged in to vote

A few quick comments, will try to look at it later:

I'd highly recommend looking at scikit-build-core, it's designed to build CMake extension modules. Your approach has several issues. You shouldn't add cmake and ninja to your build system requirements, as systems like Conda, Linux package managers, etc. do not supply these modules. And you should never import cmake without having a fallback on a system-installed CMake. Scikit-build-core does this for you correctly. Also, you are using wheel.bdist_wheel, which is deprecated (wheel has never claimed to have a public API), and is being moved to setuptools in the next release, and then removed from wheel entirely. Again, scikit-build-core fi…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@henryiii
Comment options

@1yefuwang1
Comment options

@1yefuwang1
Comment options

@henryiii
Comment options

@henryiii
Comment options

Answer selected by 1yefuwang1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants