0
easy_install-2.5 python-ldap
Searching for python-ldap
Reading http://pypi.python.org/simple/python-ldap/
Reading http://www.python-ldap.org/
Best match: python-ldap 2.4.10
Downloading http://pypi.python.org/packages/source/p/python-ldap/python-ldap-2.4.10.tar.gz#md5=a15827ca13c90e9101e5e9405c1d83be
Processing python-ldap-2.4.10.tar.gz
Running python-ldap-2.4.10/setup.py -q bdist_egg --dist-dir /tmp/easy_install-dplmGE/python-ldap-2.4.10/egg-dist-tmp-ZlXBub
defines: HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
extra_compile_args: 
extra_objects: 
include_dirs: /opt/openldap-RE24/include /usr/include/sasl /usr/include
library_dirs: /opt/openldap-RE24/lib /usr/lib
libs: ldap_r
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
warning: no files found matching 'Makefile'
warning: no files found matching 'Modules/LICENSE'
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
In file included from Modules/LDAPObject.c:4:0:
Modules/common.h:10:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: Setup script exited with error: command 'gcc' failed with exit status 1
aptitude search python2.5
i   python2.5                                                                                                    - An interactive high-level object-oriented language (version 2.5)                                                      
v   python2.5-celementtree                                                                                       -                                                                                                                       
v   python2.5-cjkcodecs                                                                                          -                                                                                                                       
v   python2.5-ctypes                                                                                             -                                                                                                                       
v   python2.5-dialog                                                                                             -                                                                                                                       
v   python2.5-elementtree                                                                                        -                                                                                                                       
v   python2.5-iplib                                                                                              -                                                                                                                       
i A python2.5-minimal                                                                                            - A minimal subset of the Python language (version 2.5)                                                                 
v   python2.5-plistlib                                                                                           -                                                                                                                       
v   python2.5-profiler                                                                                           -                                                                                                                       
v   python2.5-reverend                                                                                           -                                                                                                                       
v   python2.5-wsgiref                   
sorin
  • 161,544
  • 178
  • 535
  • 806
  • I had the same issue - the answer [here](http://stackoverflow.com/a/6941608/214149) sorted things out for me. – Mac Apr 18 '13 at 00:39

1 Answers1

1

It looks like you need the python 2.5 header files. You might be able to find them in synaptic under python2.5-dev or something similar.

mgilson
  • 300,191
  • 65
  • 633
  • 696
  • I am not able to find a dev package for python2.5... take a look. – sorin Sep 19 '12 at 12:15
  • @sorin -- I might try installing something silly like `python2.5-celementtree` and hope that aptitude will fetch the other headers you require. Of course, you could always look for different repos as well. Unfortunately, `python2.5` is pretty old, and it's doubtful that it gets a lot of attention from the package maintainers. Is there a reason why you're limited to python2.5? – mgilson Sep 19 '12 at 12:23
  • For running tests on my packages, I have to keep 2.5 compatibility. – sorin Sep 19 '12 at 12:31
  • 1
    @sorin -- Aside from googling and looking for additional ubuntu repos, or reinstalling python2.5 from source (which I doubt you want to do since you'll then loose all of your extensions), I'm out of ideas. – mgilson Sep 19 '12 at 12:34