-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[BUG]: Cannot find Python on manylinux with CMake>=3.27 #4802
Comments
Some context, it is better to use |
Not really, if you set a minimum version (which you should), than they are the same (and I prefer the one without the 3, since IMO Python == Python 3, and I don't want to start using the 3 everywhere in case 4 ever comes.) |
Oh right, I keep forgetting that |
Hmm, might be worth checking, but I think it's identical with the minimum, especially since this is common on Unix without venvs. But on Windows, you only have |
Required prerequisites
What version (or hash if on master) of pybind11 are you using?
2.11.1 (also tested with latest master b9359ce)
Problem description
Pybind11 cannot find Python on manylinux containers (such as within cibuidwheel) when running in new FindPython mode (
set(PYBIND11_FINDPYTHON ON)
) or under CMake>=3.27 (where that new mode is the default).Traces always have the following form:
Adding a
find_package(Python REQUIRED COMPONENTS Interpreter Development.Module)
statement before the pybind11 import fixes the problem, but I fail to understand why that should be required and would consider this a bug.
Reproducible example code
The same error occurs with the even simpler
Running
instead, yields
The text was updated successfully, but these errors were encountered: