3

I'm trying to compile a Python binding, but I'm unable to find the python.h header on debian. Which package should I install?

5 Answers 5

5

you should install python-dev

Sign up to request clarification or add additional context in comments.

Comments

1

The python-dev package needs to be installed.

Comments

1

First of all, the header file for embedding or extending python is Python.h, with an uppercase P. Linux is case sensitive, and python.h won't work.

On debian and debian deriviatives like ubuntu, you can use apt-file to find out what package to install, given a filename:

$ apt-file search Python.h
...
python2.6-dbg: /usr/include/python2.6_d/Python.h
python2.6-dev: /usr/include/python2.6/Python.h
...

1 Comment

or, if you don't have apt-file installed, the web interface at packages.debian.org: debian.org/distrib/packages#search_contents
0

You are missing the development header. try

sudo apt-get install python-dev

Comments

0
sudo apt-get install python2.6-dev 

or

sudo apt-get install python2.7-dev 

According to virtualenv option

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.