Closed khaledmohamedgamal closed 1 year ago
Hi @khaledmohamedgamal,
Could you please try sudo make install
after make
? I'm not sure that it solve the problem, but please try it and let me know your progress. I will try to find other potential causes. Thank you.
Thanks a lot @seungjae24 for your reply, and the work you have done in this repo, I found the solution it is related that I have many version of python in my machine, and pybind11 when creating the .so, it used the python version in usr/local. For example, I have conda environment with python 3.9, but the python that pybind11 sees is python 3.7; therefore, when I tried to import pypatchworkpp from python script with python version different than the python version that pybind11 sees, I got this error.
Here is the solution to specify the python version:
The target Python version can be selected by setting PYBIND11_PYTHON_VERSION
or an exact Python installation can be specified with PYTHON_EXECUTABLE
when you run cmake. For example:
cmake -DPYBIND11_PYTHON_VERSION**=3**.6 ..
# Another method:
cmake -DPYTHON_EXECUTABLE**=**/path/to/python ..
Thank you for sharing your problem and solution, @khaledmohamed00!
It will help others who may struggle similar situation as you. Thank you once again :)
pypatchworkpp.cpython-38-x86_64-linux-gnu.so
is built in/build/python_wrapper
. However when I runpython examples/python/demo_sequential.py
, I get this messageCannot find pypatchworkpp!