Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I got an installation script that calls gcc and gcc tries to compile a .c file that includes a header that does not exist on my system (ubuntu) .

#include "Python.h"

I have both python 2.x and python 3.x installed but running a

sudo find / -name "Python.h"

gives back no results. I suspect that it might not be bundled with python binaries. Did anyone have to solve something similar to this?Thank you.

share|improve this question
Just to follow up on this. The python-dev packages aims for your default python installation while python3.2-dev for your python3.2 installation. – kaiseroskilo Feb 12 '12 at 12:39
up vote 5 down vote accepted

Python.h is part of the source code for python. You will need python-dev to get the headers installed correctly. Just run sudo apt-get install python-dev

If you need the development files for Python 3, use sudo apt-get install python3-dev instead.

share|improve this answer
Yes, python-dev added /usr/lib/python2.7/Python.h . Thanks for the advice. – kaiseroskilo Feb 11 '12 at 19:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.