Pangolin icon indicating copy to clipboard operation
Pangolin copied to clipboard

No rule to make target 'pypangolin_pip_install'

Open gh279760559 opened this issue 3 years ago • 1 comments

Hello,

I got the same error when trying to build with the target argument

cmake --build . --target pypangolin_pip_install
"make: *** No rule to make target 'pypangolin_pip_install'. Stop."

I notice when using cmake to build with your suggestion -DPYTHON-DIR="/usr/bin/python3.8" it said:

"WARNING: Target "pango_python" has EXCLUDE_FROM_ALL set and will not be built by default but an install rule has been provided for it.  CMake does not define behavior for this case."

and

"  Manually-specified variables were not used by the project:
    PYTHON-DIR
"

I have tested the executable example HelloPangolin which works successfully but could not import it from Python Did I miss anything? Cheers.

gh279760559 avatar Dec 15 '21 13:12 gh279760559

Pangolin relies on PyBind11 for interfacing to python, so the first step in getting Pangolin going with Python is in making sure that PyBind11 is setup correctly (either with Pangolins submodule, or through your package manager). With pybind11 installed, check that Pangolin can find it. You should see a line like: -- pybind11 v2.7.1 in your cmake output.

With no Pybind11, Pangolin wont be looking for python and so the PYTHON-DIR variables etc will go unused. This might be this issue. Once Pangolin has found Pybind11, you can refer to pybind11's documentation on selecting and finding python:

https://pybind11.readthedocs.io/en/latest/faq.html#cmake-doesn-t-detect-the-right-python-version

Hope that helps!

stevenlovegrove avatar Mar 17 '22 21:03 stevenlovegrove