Page MenuHome

Missing "Python.h" when building Python extensions
Closed, ArchivedPublic


System Information
Operating system: Ubuntu 16.04

Blender Version
Broken: 2.79b release

Short description of error
When trying to install some Python packages building C/C++ extensions, the installation fails because it seems to be missing some Python header files.
Maybe publishing all the headers used to compile the Python interpreter would help?

Exact steps for others to reproduce the error

virtualenv -p /path/to/blender/2.79/python/bin/python3.5m .venv
source .venv/bin/activate

pip install dependency-injector



Event Timeline

My original goal was to install pythonnet, but it is a deep pain to get to the point where files are missing. dependency-injector is the easiest one to reproduce the issue.

Although if one of you, either on windows or linux, manages to install pythonnet I would be glad to hear from you.

Stephen Swaney (stiv) closed this task as Archived.
Stephen Swaney (stiv) claimed this task.

Typically, to compile a package named 'foo' in Linux, you need to install the necessary foo-dev or foo-devel to get the header files.

For Blender itself, if you use the install-deps script, you end up with something like $SRC_DIR/blender-deps/Python-3.7.0/Include/Python.h
You will need to set the appropriate -I include paths

This is not a Blender bug.
A good place to get help compiling things is the #blendercoders channel on freenode IRC.

Sorry, I didn't know where to post this issue (that is not a bug).

On the other hand, it prevents me from doing some things, such as installing Python packages.

Thank you for your answer, but if I want people to install that package, everyone will have to compile Blender from scratch? Windows and Linux? Isn't that overkill?

The goal would be to simply run pip install thing, and setuptools takes care of autobuilding stuff needed, you don't have to build things yourself, it is supposed to be transparent.