
Hi Can anyone help? I’m pretty new to Python and Raspberry Pi. When running PIP, I seem to get fatal error:
Python.h: No such file or directory
<hash>include “Python.h”
compilation terminated
I get this when attempting to download both Cython and scikit-image. So I’m assuming it is some absent file or path reference on the Raspberry Pi installation I have, rather than in the distribution package?
What is this file “Python.h” that it is trying to include?

Look for a python-dev or python-devel package.
On Jun 26, 2017 6:36 AM, "Rick" rfox.beeches@btinternet.com wrote:
Hi Can anyone help? I’m pretty new to Python and Raspberry Pi. When running PIP, I seem to get fatal error:
Python.h: No such file or directory
<hash>include “Python.h”
compilation terminated
I get this when attempting to download both *Cython* and *scikit-image*. So I’m assuming it is some absent file or path reference on the Raspberry Pi installation I have, rather than in the distribution package?
What is this file “Python.h” that it is trying to include?
Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig

Most Linux distributions package the Python development header files (which are needed to compile Python modules written in C) separately from the Python language itself. Ubuntu calls their package 'python-dev', and you could 'apt-get install python-dev' to install it. Other Linux distributions will call it something similar (such as 'python-devel').

On 26/06/2017 10:03, Rick wrote:
Hi Can anyone help? I’m pretty new to Python and Raspberry Pi. When running PIP, I seem to get fatal error:
Python.h: No such file or directory
<hash>include “Python.h”
compilation terminated
I get this when attempting to download both _Cython_ and _scikit-image_. So I’m assuming it is some absent file or path reference on the Raspberry Pi installation I have, rather than in the distribution package?
What is this file “Python.h” that it is trying to include?
Others have answered the immediate question. But, in general, you'll probably want to install tools like Cython and scikit from the Raspberry Pi repositories directly (where they come prebuilt).
I don't have an RPi here, but try something like "sudo apt install cython scikit"
TJG
participants (4)
-
James Bennett
-
Matt Joyce
-
Rick
-
Tim Golden