PDA

View Full Version : [SOLVED] Can't find Python3's Python.h



atavory
October 21st, 2012, 06:51 PM
Hello,

I'm trying to port a Python C extension to Python3 on Ubuntu 12.10. Building the extension using Python 2.73 (via "python setup.py build") works fine, but building using Python 3 (via "python3 setup.py build") fails due to not finding Python.h. Running "locate Python.h" confirms that it is present in "/usr/include/python2.7/", but absent from "/usr/include/python3.2mu", which is where distutils is looking for it. The Ubuntu Software Center indicates that Python 3.2.3 is fully installed. Where is the missing header? I'd appreciate advice.

Thanks & Bye,

Ami

MadCow108
October 21st, 2012, 06:56 PM
you need to install python3.2-dev or python3-dev for the default version

atavory
October 21st, 2012, 07:10 PM
That was it. Many thanks!