Python package installation, fails to find Python.h

For my work, I need PyDense CRF to work within IsaacSim. To install I attempted:

bash python.sh -m pip install git+https://github.com/lucasb-eyer/pydensecrf.git

Error:

  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ipydensecrf/densecrf/include -Ipydensecrf -I/builds/omniverse/externals/python-build/_build/repopackageroot/include/python3.7m -c pydensecrf/eigen.cpp -o build/temp.linux-x86_64-cpython-37/pydensecrf/eigen.o
  pydensecrf/eigen.cpp:28:10: fatal error: Python.h: No such file or directory
     28 | #include "Python.h"
        |          ^~~~~~~~~~
  compilation terminated.
  error: command '/usr/bin/gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for pydensecrf

Outside of Isaac, this is easily solvable by sudo apt install python(3)-dev. In Isaac, I have no idea how to approach this issue.

Any advice?

Thanks

I had to

bash python.sh -m pip install -e <PATH TO>/pydensecrf --global-option=build_ext \
--global-option="-I<PATH TO>/ov/pkg/isaac_sim-2022.1.1/kit/python/include/python3.7m"

It’s successful.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.