You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using pybind11 to build a Python module from C++ code. For example, the somecode.cpp file contains a function named square() and pybind11 creates a binary module named somecode.cpython-310-darwin.so. If a script is in the same directory as the binary module, I can import the module in that script using import somecode. Or if I start a REPL session from within the directory, I can also import the module in the REPL session. But if I try to install the module in a Python environment using pip install somecode.cpython-310-darwin.so it gives the following errors:
ERROR: Could not find a version that satisfies the requirement somecode.cpython-310-darwin.so (from versions: none)
ERROR: No matching distribution found for somecode.cpython-310-darwin.so
How can I install this binary module created from pybind11 into a Python environment?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using pybind11 to build a Python module from C++ code. For example, the
somecode.cpp
file contains a function namedsquare()
and pybind11 creates a binary module namedsomecode.cpython-310-darwin.so
. If a script is in the same directory as the binary module, I can import the module in that script usingimport somecode
. Or if I start a REPL session from within the directory, I can also import the module in the REPL session. But if I try to install the module in a Python environment usingpip install somecode.cpython-310-darwin.so
it gives the following errors:How can I install this binary module created from pybind11 into a Python environment?
Beta Was this translation helpful? Give feedback.
All reactions