How to specify or add directory to Python.h search path during setup.py build/install

Posted by ca2longoria on Super User See other posts from Super User or by ca2longoria
Published on 2012-06-02T02:44:12Z Indexed on 2012/06/02 4:43 UTC
Read the original article Hit count: 212

Filed under:
|
|
|
|

I'm running Linux, and have downloaded a python module I must install without access to any but my particular /home/user directory (I have no root privileges nor the option to pursue them).

This of course requires the Python source. This I've downloaded and have laying around in said user directory.

While asking the admin to copy the proper files into /usr/include/python2.7 is the easiest way to go about this, I am hoping for a more general and portable solution to this kind of problem.

Changing only data in the module source (MANIFEST.in, README.txt, setup.py, etc.), how might I add an arbitrary directory to the search path for Python.h and friends?

(Without a solution, "python setup.py build" will continue returning with the "Python.h: No such file or directory" error)

Thank you very much.

(Additionally, is it acceptable to post this both here and on StackOverflow?)

© Super User or respective owner

Related posts about installation

Related posts about python