Include Python header files in Blender distribution
At the moment, Blender is distributed without Python header files (
Python.h
etc.). This complicates the installation of some packages that require these development files.
E.g.
blender-2.82-linux64/2.82/python/bin/pip install transformations
will fail with
transformations/transformations.c:57:10: fatal error: Python.h: No such file or directory
#include "Python.h"
^~~~~~~~~~
compilation terminated.
because of missing header files in
2.82/python/include/python3.7m/
.
Those header files are less than 600kB and should be distributed with Blender.
See also: developer.blender.org/T74470
1 Comment
Most of the time these are dependency-issues. Python.h is used by GNU Compiler Collection (gcc) to build applications. You need to install a package called python-dev for building Python modules, extending the Python interpreter or embedding Python in applications. You encounter "Python.h: No such file or directory" error while trying to build a shared library using the file extension of another language ( e.g. 'C' ). If you are trying to build a shared library using the file extension of another language, you need to install the correct development version of Python.
Reason for this error:
You haven't properly installed the header files and static libraries for python dev. Also, sometimes include files might not be default in the include path.
How to solve this error:
Install the missing files and libraries. Include Path and Library. Finally, Compile it.
net-informations.com/python/err/pyh.htm