Installing python-ldap in virtualenv fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Identity (keystone) |
Fix Released
|
High
|
Unassigned |
Bug Description
Trying to install python-ldap fails when installing it in virtualenv via pip-requires file:
Running setup.py install for python-ldap
extra_
extra_objects:
include_dirs: /usr/local/
library_dirs: /usr/local/
libs: ldap_r lber sasl2 ssl crypto
file Lib/ldap.py (for module ldap) 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/schema.py (for module ldap.schema) not found
file Lib/ldap.py (for module ldap) 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'
building '_ldap' extension
gcc -pthread -fno-strict-
Modules/
compilation terminated.
error: command 'gcc' failed with exit status 1
Complete output from command /home/jpipes/
extra_
extra_objects:
include_dirs: /usr/local/
library_dirs: /usr/local/
libs: ldap_r lber sasl2 ssl crypto
running install
running build
running build_py
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
creating build
creating build/lib.
copying Lib/ldapurl.py -> build/lib.
copying Lib/ldif.py -> build/lib.
copying Lib/dsml.py -> build/lib.
creating build/lib.
copying Lib/ldap/
copying Lib/ldap/async.py -> build/lib.
copying Lib/ldap/
copying Lib/ldap/cidict.py -> build/lib.
copying Lib/ldap/dn.py -> build/lib.
copying Lib/ldap/filter.py -> build/lib.
copying Lib/ldap/
copying Lib/ldap/
copying Lib/ldap/modlist.py -> build/lib.
copying Lib/ldap/resiter.py -> build/lib.
copying Lib/ldap/sasl.py -> build/lib.
creating build/lib.
copying Lib/ldap/
copying Lib/ldap/
copying Lib/ldap/
copying Lib/ldap/
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
running egg_info
writing requirements to Lib/python_
writing Lib/python_
writing top-level names to Lib/python_
writing dependency_links to Lib/python_
warning: manifest_maker: standard file '-c' not found
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
reading manifest file 'Lib/python_
reading manifest template 'MANIFEST.in'
warning: no files found matching 'Makefile'
warning: no files found matching 'Modules/LICENSE'
writing manifest file 'Lib/python_
running build_ext
building '_ldap' extension
creating build/temp.
creating build/temp.
gcc -pthread -fno-strict-
Modules/
compilation terminated.
error: command 'gcc' failed with exit status 1
Is there some missing dependency that the python-ldap package relies on but needs to be installed on my machine?
-jay
pip likely can't do anything about this since it depends on a C library to be installed, which is out-of-scope for pip.
Depending on your operating system, you'll need to install the cyrus-sasl development package.
That would be cyrus-sasl-devel on RedHat based distros and libsasl2-dev on Debian based distros IIRC.