user3333434
user3333434

Reputation: 13

Missing Python.h and impossible to find

I know there are already similar questions about the missing Python.h but NO solution worked for me by now.

I need Python libraries in order to use Tossim, which is a tinyOS simulator (http://tinyos.net).

Python appears to be already installed on my Ubuntu 12.04 system. In fact whenever I run the command

$ python -V

I get the output 2.7.3

Anyway when I try to locate Python.h no file is found. Python libraries are located in usr/lib/ but no headers in the folder.

Mind that I already tried the most common solution for this problem, that is $ sudo apt-get install python-dev , and also $ sudo apt-get update. None of them worked for me.

What should I do now? I tried to remove and reinstall python-dev, with no success. I only think to manually download and place the header into the folder usr/lib/python2.7. But I doubt it is a good idea. Can somebody help me? Thank you in advance.`

Upvotes: 0

Views: 898

Answers (1)

Martijn Pieters
Martijn Pieters

Reputation: 1122152

Ubuntu (and Debian) stores Python include files in /usr/include/python2.7. If the python2.7-dev package is installed (a dependency of python-dev) then Python.h will be located at:

/usr/include/python2.7/Python.h

You can locate what packages contain the file with the command:

dpkg -S Python.h

or list what files are installed with a package with:

dpkg -L python2.7-dev

Upvotes: 1

Related Questions