-
Notifications
You must be signed in to change notification settings - Fork 221
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
Updating pybind and ImportError: dynamic module #153
Comments
|
I indeed have:
in
in I edited the original question, it was just to anonymize the code. Sorry for the lack of details, I tried to gather as much information as I could. |
Is there an issue finding Python? If it finds Python 2, for example, the above would happen. Ahh, one big change - you are manually calling FindPython, so pybind11 will use that nowadays, rather than using the deprecated (and removed, sort of, in CMake 3.27) FindPythonInterp. Are you calling (Also, you should use targets everywhere instead if classic statements like |
Thank for the help. in
|
I tried with reversing the order in
but the problem persists: When I import
|
my code uses a very old version of pybind:
2.6.0
and everything works fine.I have two modules,
liba
andlibb
With
2.6.0
I have:Same code on
2.7.1
and higher, and I get the following error.I didn't change one single line in the code.
Importing liba still works, but libb fails.
My module is correctly defined in a
cpp
file.My CMake looks like this:
And my environment:
I compile my libs with
gcc12
I am puzzled why upgrading the version of pybind makes my imports fail. Maybe I am doing something wrong, but I can't pinpoint it.
The text was updated successfully, but these errors were encountered: