-
Notifications
You must be signed in to change notification settings - Fork 219
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
CMake can't find Python since python 3.11 was added #1347
Comments
I think the problem is not just manylinux2014 but generalized to all the images where Python 3.11 was added. I have it with quay.io/pypa/manylinux2014_x86_64 as well. |
You shall not depend on
|
Thank you, this fixes the problem, closing the bug (but I will make sure this is documented somewhere...) |
Ahhhh! Thank you! Knowing CMake I presume this is undocumented or hidden in
one not so obvious location in the docs. Sorry for the misplaced bug report…
Le dim. 10 juill. 2022 à 14:28, Matthieu Darbois ***@***.***>
a écrit :
… You shall not depend on Development / Python3::Python when building an
extension module.
Instead, you should use Development.Module / Python3::Module:
|
Based on the [cmake issue](https://gitlab.kitware.com/cmake/cmake/-/issues/23716) and [manylinux issue](pypa/manylinux#1347), when building a python module, it should find the `Development.Module` module, not `Development`, which includes `Development.Module` and `Development.Embed`, and will expect the shared python library only. After this PR and before #124613, pytorch could be built with a static libpython (e.g. in manylinux). Pull Request resolved: #129669 Approved by: https://github.com/malfet
Based on the [cmake issue](https://gitlab.kitware.com/cmake/cmake/-/issues/23716) and [manylinux issue](pypa/manylinux#1347), when building a python module, it should find the `Development.Module` module, not `Development`, which includes `Development.Module` and `Development.Embed`, and will expect the shared python library only. After this PR and before #124613, pytorch could be built with a static libpython (e.g. in manylinux). Cherry-pick of 953c647 into release/2.4
…ch#129669) Based on the [cmake issue](https://gitlab.kitware.com/cmake/cmake/-/issues/23716) and [manylinux issue](pypa/manylinux#1347), when building a python module, it should find the `Development.Module` module, not `Development`, which includes `Development.Module` and `Development.Embed`, and will expect the shared python library only. After this PR and before pytorch#124613, pytorch could be built with a static libpython (e.g. in manylinux). Pull Request resolved: pytorch#129669 Approved by: https://github.com/malfet
Some of my manylinux builds that use this image are failing with a maddening and incomprehensible CMake error, seemingly no matter how I invoke my build or set up my virtual environment or lack thereof:
A minimal CMakeLists.txt that triggers the problem:
Steps to replicate:
Curiously, skbuild seems not to trigger this problem.
The text was updated successfully, but these errors were encountered: