Python.h: No such file or directory
I am building a package where my catkin config cmage args are:
Additional CMake Args: -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.6m.so -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m
and in the CMakeLists.txt also I have:
include_directories(include
${PYTHON_INCLUDE_DIRS}
...
)
but still get the following error during build:
fatal error: Python.h: No such file or directory
#include <Python.h>
anyone knows a solution for this?
If I am not wrong. ROS melodic uses python2.7, not Python 3
You could try ROS Noetic.
@Solrac3589 yea by default it is python2.7 but with cmake arguments it is also possible in general to use python3 in it. at the moment it would take very long to make my application compatible wiht Noetic, and it seems it shouldn't be hard to make it find that python.h file, it's strange...