Import two pybind11 .pyd Modules generated by same C++ source code #4144
Unanswered
tricostume
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Having a fully functional .pyd Python module generated with pybind11, assume the C++ source code involved changes a little bit but the exposed interface between C++ and Python remains constant.
If we compiled before the changes we would obtain a slightly different .pyd object as compiling afterwards. How can I import both .pyd modules in Python and use them accordingly?
Until now if I naively generate them e.g. by changing the code and saving the .pyd files in different locations I can import the first module and I get the next error while importing the second one: ImportError: generic_type: type "foo" is already registered as if the C++ types should actually be different to allow for this.
Beta Was this translation helpful? Give feedback.
All reactions