Fatal error: Python.h: No such file or directory #27036
-
I’m wondering how to manage my python 3.8 environment in github actions, I’m using the following in my action, but I can’t seem to get the headers into the PATH. fatal error: Python.h: No such file or directory 332 124 | #include <Python.h>
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
It looks like you’re mixing the Python version set up by
bmahlbrand:
I don’t know which version is better for your project, but mixing probably isn’t good. I’m not sure if |
Beta Was this translation helpful? Give feedback.
-
It turns out I had a non portable path set up in my cmakelists.txt that setup.py was running. To confirm for future travelers, just using actions/setup-python@v2 should have the C headers installed in /usr/include/python3.8 (in this case) should work as expected, the ubuntu headers aren’t required, so I deleted them. |
Beta Was this translation helpful? Give feedback.
It turns out I had a non portable path set up in my cmakelists.txt that setup.py was running. To confirm for future travelers, just using actions/setup-python@v2 should have the C headers installed in /usr/include/python3.8 (in this case) should work as expected, the ubuntu headers aren’t required, so I deleted them.