[clug] How to find Python's include file directory
Jeremy Kerr
jk at ozlabs.org
Mon Sep 27 21:39:14 MDT 2010
Hi Carlo,
> Is there a sane and reliable way to get the location of that include
> directory for the default Python installation on a Linux system? I
> could use "python --version" to get the version and then guess that
> /usr/include/python2.x is the right directory, but that would break if
> someone did their own custom installation to /usr/local or /opt.
Looks like:
python-config --includes
will do what you need.
Cheers,
Jeremy
More information about the linux
mailing list