Hi Team,
we been trying to install python-ldap — 3.3.1 via PIP3
pip3 install python-ldap
also tried with pip install python-ldap
facing below issue
[root@XXX]$ pip3 install python-ldap
Collecting python-ldap
Using cached python-ldap-3.3.1.tar.gz (379 kB)
Requirement already satisfied: pyasn1>=0.3.7 in /usr/local/lib/python3.6/site-packages (from python-ldap) (0.4.8)
Requirement already satisfied: pyasn1_modules>=0.1.5 in /usr/local/lib/python3.6/site-packages (from python-ldap) (0.2.8)
Using legacy ‘setup.py install’ for python-ldap, since package ‘wheel’ is not installed.
Installing collected packages: python-ldap
Running setup.py install for python-ldap … error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c ‘import io, os, sys, se
we understand that https://pypi.org/project/python-ldap/#files no .whl file available and that required for PIP installation.
why that is missed / how can we fix this.
please help us here.
Thanks!
Please copy and paste the entire output of pip install
. The interesting bits and pieces are usually at the end of the output.
Thanks for the quick reply
[root@XXX]$ pip3 install python-ldap
Collecting python-ldap
Using cached python-ldap-3.3.1.tar.gz (379 kB)
Requirement already satisfied: pyasn1>=0.3.7 in /usr/local/lib/python3.6/site-packages (from python-ldap) (0.4.8)
Requirement already satisfied: pyasn1_modules>=0.1.5 in /usr/local/lib/python3.6/site-packages (from python-ldap) (0.2.8)
Using legacy ‘setup.py install’ for python-ldap, since package ‘wheel’ is not installed.
Installing collected packages: python-ldap
Running setup.py install for python-ldap … error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘»‘»‘/tmp/pip-install-1z304vf7/python-ldap_537e27b2183f43bea575be8c2690c77c/setup.py'»‘»‘; file='»‘»‘/tmp/pip-install-1z304vf7/python-ldap_537e27b2183f43bea575be8c2690c77c/setup.py'»‘»‘;f = getattr(tokenize, ‘»‘»‘open'»‘»‘, open)(file) if os.path.exists(file) else io.StringIO(‘»‘»‘from setuptools import setup; setup()'»‘»‘);code = f.read().replace(‘»‘»‘rn'»‘»‘, ‘»‘»‘n'»‘»‘);f.close();exec(compile(code, file, ‘»‘»‘exec'»‘»‘))’ install —record /tmp/pip-record-b3lujmlt/install-record.txt —single-version-externally-managed —compile —install-headers /usr/local/include/python3.6m/python-ldap
cwd: /tmp/pip-install-1z304vf7/python-ldap_537e27b2183f43bea575be8c2690c77c/
Complete output (82 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
copying Lib/ldapurl.py -> build/lib.linux-x86_64-3.6
copying Lib/ldif.py -> build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/init.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/async.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/asyncsearch.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/cidict.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/compat.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/constants.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/dn.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/filter.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/functions.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/ldapobject.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/logger.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/modlist.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/pkginfo.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/resiter.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/sasl.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/syncrepl.py -> build/lib.linux-x86_64-3.6/ldap
creating build/lib.linux-x86_64-3.6/ldap/controls
copying Lib/ldap/controls/init.py -> build/lib.linux-x86_64-3.6/ldap/controls
copying Lib/ldap/controls/deref.py -> build/lib.linux-x86_64-3.6/ldap/controls
copying Lib/ldap/controls/libldap.py -> build/lib.linux-x86_64-3.6/ldap/controls
copying Lib/ldap/controls/openldap.py -> build/lib.linux-x86_64-3.6/ldap/controls
copying Lib/ldap/controls/pagedresults.py -> build/lib.linux-x86_64-3.6/ldap/controls
copying Lib/ldap/controls/ppolicy.py -> build/lib.linux-x86_64-3.6/ldap/controls
copying Lib/ldap/controls/psearch.py -> build/lib.linux-x86_64-3.6/ldap/controls
copying Lib/ldap/controls/pwdpolicy.py -> build/lib.linux-x86_64-3.6/ldap/controls
copying Lib/ldap/controls/readentry.py -> build/lib.linux-x86_64-3.6/ldap/controls
copying Lib/ldap/controls/sessiontrack.py -> build/lib.linux-x86_64-3.6/ldap/controls
copying Lib/ldap/controls/simple.py -> build/lib.linux-x86_64-3.6/ldap/controls
copying Lib/ldap/controls/sss.py -> build/lib.linux-x86_64-3.6/ldap/controls
copying Lib/ldap/controls/vlv.py -> build/lib.linux-x86_64-3.6/ldap/controls
creating build/lib.linux-x86_64-3.6/ldap/extop
copying Lib/ldap/extop/init.py -> build/lib.linux-x86_64-3.6/ldap/extop
copying Lib/ldap/extop/dds.py -> build/lib.linux-x86_64-3.6/ldap/extop
copying Lib/ldap/extop/passwd.py -> build/lib.linux-x86_64-3.6/ldap/extop
creating build/lib.linux-x86_64-3.6/ldap/schema
copying Lib/ldap/schema/init.py -> build/lib.linux-x86_64-3.6/ldap/schema
copying Lib/ldap/schema/models.py -> build/lib.linux-x86_64-3.6/ldap/schema
copying Lib/ldap/schema/subentry.py -> build/lib.linux-x86_64-3.6/ldap/schema
copying Lib/ldap/schema/tokenizer.py -> build/lib.linux-x86_64-3.6/ldap/schema
creating build/lib.linux-x86_64-3.6/slapdtest
copying Lib/slapdtest/init.py -> build/lib.linux-x86_64-3.6/slapdtest
copying Lib/slapdtest/_slapdtest.py -> build/lib.linux-x86_64-3.6/slapdtest
running egg_info
writing Lib/python_ldap.egg-info/PKG-INFO
writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt
writing requirements to Lib/python_ldap.egg-info/requires.txt
writing top-level names to Lib/python_ldap.egg-info/top_level.txt
reading manifest file ‘Lib/python_ldap.egg-info/SOURCES.txt’
reading manifest template ‘MANIFEST.in’
no previously-included directories found matching ‘Doc/.build’
writing manifest file ‘Lib/python_ldap.egg-info/SOURCES.txt’
creating build/lib.linux-x86_64-3.6/slapdtest/certs
copying Lib/slapdtest/certs/README -> build/lib.linux-x86_64-3.6/slapdtest/certs
copying Lib/slapdtest/certs/ca.conf -> build/lib.linux-x86_64-3.6/slapdtest/certs
copying Lib/slapdtest/certs/ca.pem -> build/lib.linux-x86_64-3.6/slapdtest/certs
copying Lib/slapdtest/certs/client.conf -> build/lib.linux-x86_64-3.6/slapdtest/certs
copying Lib/slapdtest/certs/client.key -> build/lib.linux-x86_64-3.6/slapdtest/certs
copying Lib/slapdtest/certs/client.pem -> build/lib.linux-x86_64-3.6/slapdtest/certs
copying Lib/slapdtest/certs/gencerts.sh -> build/lib.linux-x86_64-3.6/slapdtest/certs
copying Lib/slapdtest/certs/gennssdb.sh -> build/lib.linux-x86_64-3.6/slapdtest/certs
copying Lib/slapdtest/certs/server.conf -> build/lib.linux-x86_64-3.6/slapdtest/certs
copying Lib/slapdtest/certs/server.key -> build/lib.linux-x86_64-3.6/slapdtest/certs
copying Lib/slapdtest/certs/server.pem -> build/lib.linux-x86_64-3.6/slapdtest/certs
running build_ext
building ‘_ldap’ extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/Modules
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong —param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=3.3.1 -DLDAPMODULE_AUTHOR=python-ldap project -DLDAPMODULE_LICENSE=Python style -IModules -I/usr/include/python3.6m -c Modules/LDAPObject.c -o build/temp.linux-x86_64-3.6/Modules/LDAPObject.o
In file included from Modules/LDAPObject.c:3:0:
Modules/common.h:9:20: fatal error: Python.h: No such file or directory
#include «Python.h»
^
compilation terminated.
error: command ‘gcc’ failed with exit status 1
—————————————-
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘»‘»‘/tmp/pip-install-1z304vf7/python-ldap_537e27b2183f43bea575be8c2690c77c/setup.py'»‘»‘; file='»‘»‘/tmp/pip-install-1z304vf7/python-ldap_537e27b2183f43bea575be8c2690c77c/setup.py'»‘»‘;f = getattr(tokenize, ‘»‘»‘open'»‘»‘, open)(file) if os.path.exists(file) else io.StringIO(‘»‘»‘from setuptools import setup; setup()'»‘»‘);code = f.read().replace(‘»‘»‘rn'»‘»‘, ‘»‘»‘n'»‘»‘);f.close();exec(compile(code, file, ‘»‘»‘exec'»‘»‘))’ install —record /tmp/pip-record-b3lujmlt/install-record.txt —single-version-externally-managed —compile —install-headers /usr/local/include/python3.6m/python-ldap Check the logs for full command output.
Hi
Thanks for the doc
below components are already installed on my machine
[root@XXX]$ python3 —version
Python 3.6.8
[root@XXX]$
[root@XXX]$ rpm -qa | grep openldap
openldap-clients-2.4.44-13.el7.x86_64
openldap-2.4.44-13.el7.x86_64
does really required python3-devel component
Great after installed all the prerequisites python-ldap installed properly !!!
thanks
I am facing the same issue in Ubuntu 18.4 python3.8.12 but docs aren’t useful can you please suggest any other way out ?
I am facing the same issue in Ubuntu 18.4 python3.8.12 but docs aren’t useful can you please suggest any other way out ?
Could you please create a new ticket with the build logs and system details?
Collecting python-ldap
Using cached python-ldap-3.3.1.tar.gz (379 kB)
Preparing metadata (setup.py) … done
Requirement already satisfied: pyasn1>=0.3.7 in ./.venv/lib/python3.8/site-packages (from python-ldap) (0.4.8)
Requirement already satisfied: pyasn1_modules>=0.1.5 in ./.venv/lib/python3.8/site-packages (from python-ldap) (0.2.8)
Building wheels for collected packages: python-ldap
Building wheel for python-ldap (setup.py) … error
ERROR: Command errored out with exit status 1:
command: /home/lee/Desktop/annotation-tool/.venv/bin/python3.8 -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘»‘»‘/tmp/pip-install-4yo5vsck/python-ldap_20f7ac56e284475b90fa2b70b3984878/setup.py'»‘»‘; file='»‘»‘/tmp/pip-install-4yo5vsck/python-ldap_20f7ac56e284475b90fa2b70b3984878/setup.py'»‘»‘;f = getattr(tokenize, ‘»‘»‘open'»‘»‘, open)(file) if os.path.exists(file) else io.StringIO(‘»‘»‘from setuptools import setup; setup()'»‘»‘);code = f.read().replace(‘»‘»‘rn'»‘»‘, ‘»‘»‘n'»‘»‘);f.close();exec(compile(code, file, ‘»‘»‘exec'»‘»‘))’ bdist_wheel -d /tmp/pip-wheel-uwiw4jrm
cwd: /tmp/pip-install-4yo5vsck/python-ldap_20f7ac56e284475b90fa2b70b3984878/
Complete output (83 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
copying Lib/ldapurl.py -> build/lib.linux-x86_64-3.8
copying Lib/ldif.py -> build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/asyncsearch.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/modlist.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/pkginfo.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/constants.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/resiter.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/dn.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/cidict.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/init.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/logger.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/ldapobject.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/compat.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/filter.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/async.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/syncrepl.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/sasl.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/functions.py -> build/lib.linux-x86_64-3.8/ldap
creating build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/pagedresults.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/libldap.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/sss.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/openldap.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/readentry.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/init.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/psearch.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/deref.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/simple.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/pwdpolicy.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/sessiontrack.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/ppolicy.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/vlv.py -> build/lib.linux-x86_64-3.8/ldap/controls
creating build/lib.linux-x86_64-3.8/ldap/extop
copying Lib/ldap/extop/passwd.py -> build/lib.linux-x86_64-3.8/ldap/extop
copying Lib/ldap/extop/init.py -> build/lib.linux-x86_64-3.8/ldap/extop
copying Lib/ldap/extop/dds.py -> build/lib.linux-x86_64-3.8/ldap/extop
creating build/lib.linux-x86_64-3.8/ldap/schema
copying Lib/ldap/schema/tokenizer.py -> build/lib.linux-x86_64-3.8/ldap/schema
copying Lib/ldap/schema/init.py -> build/lib.linux-x86_64-3.8/ldap/schema
copying Lib/ldap/schema/models.py -> build/lib.linux-x86_64-3.8/ldap/schema
copying Lib/ldap/schema/subentry.py -> build/lib.linux-x86_64-3.8/ldap/schema
creating build/lib.linux-x86_64-3.8/slapdtest
copying Lib/slapdtest/init.py -> build/lib.linux-x86_64-3.8/slapdtest
copying Lib/slapdtest/_slapdtest.py -> build/lib.linux-x86_64-3.8/slapdtest
running egg_info
writing Lib/python_ldap.egg-info/PKG-INFO
writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt
writing requirements to Lib/python_ldap.egg-info/requires.txt
writing top-level names to Lib/python_ldap.egg-info/top_level.txt
reading manifest file ‘Lib/python_ldap.egg-info/SOURCES.txt’
reading manifest template ‘MANIFEST.in’
no previously-included directories found matching ‘Doc/.build’
adding license file ‘LICENCE’
writing manifest file ‘Lib/python_ldap.egg-info/SOURCES.txt’
creating build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/README -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/ca.conf -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/ca.pem -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/client.conf -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/client.key -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/client.pem -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/gencerts.sh -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/gennssdb.sh -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/server.conf -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/server.key -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/server.pem -> build/lib.linux-x86_64-3.8/slapdtest/certs
running build_ext
building ‘_ldap’ extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/Modules
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=3.3.1 -DLDAPMODULE_AUTHOR=python-ldap project -DLDAPMODULE_LICENSE=Python style -IModules -I/home/lee/Desktop/annotation-tool/.venv/include -I/usr/include/python3.8 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-3.8/Modules/LDAPObject.o
In file included from Modules/LDAPObject.c:3:0:
Modules/common.h:9:10: fatal error: Python.h: No such file or directory
#include «Python.h»
^~~~~~~~~~
compilation terminated.
error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1
ERROR: Failed building wheel for python-ldap
Running setup.py clean for python-ldap
Failed to build python-ldap
Installing collected packages: python-ldap
Running setup.py install for python-ldap … error
ERROR: Command errored out with exit status 1:
command: /home/lee/Desktop/annotation-tool/.venv/bin/python3.8 -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘»‘»‘/tmp/pip-install-4yo5vsck/python-ldap_20f7ac56e284475b90fa2b70b3984878/setup.py'»‘»‘; file='»‘»‘/tmp/pip-install-4yo5vsck/python-ldap_20f7ac56e284475b90fa2b70b3984878/setup.py'»‘»‘;f = getattr(tokenize, ‘»‘»‘open'»‘»‘, open)(file) if os.path.exists(file) else io.StringIO(‘»‘»‘from setuptools import setup; setup()'»‘»‘);code = f.read().replace(‘»‘»‘rn'»‘»‘, ‘»‘»‘n'»‘»‘);f.close();exec(compile(code, file, ‘»‘»‘exec'»‘»‘))’ install —record /tmp/pip-record-5ga25n50/install-record.txt —single-version-externally-managed —compile —install-headers /home/lee/Desktop/annotation-tool/.venv/include/site/python3.8/python-ldap
cwd: /tmp/pip-install-4yo5vsck/python-ldap_20f7ac56e284475b90fa2b70b3984878/
Complete output (85 lines):
running install
/home/lee/Desktop/annotation-tool/.venv/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
copying Lib/ldapurl.py -> build/lib.linux-x86_64-3.8
copying Lib/ldif.py -> build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/asyncsearch.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/modlist.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/pkginfo.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/constants.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/resiter.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/dn.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/cidict.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/init.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/logger.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/ldapobject.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/compat.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/filter.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/async.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/syncrepl.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/sasl.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/functions.py -> build/lib.linux-x86_64-3.8/ldap
creating build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/pagedresults.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/libldap.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/sss.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/openldap.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/readentry.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/init.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/psearch.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/deref.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/simple.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/pwdpolicy.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/sessiontrack.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/ppolicy.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/vlv.py -> build/lib.linux-x86_64-3.8/ldap/controls
creating build/lib.linux-x86_64-3.8/ldap/extop
copying Lib/ldap/extop/passwd.py -> build/lib.linux-x86_64-3.8/ldap/extop
copying Lib/ldap/extop/init.py -> build/lib.linux-x86_64-3.8/ldap/extop
copying Lib/ldap/extop/dds.py -> build/lib.linux-x86_64-3.8/ldap/extop
creating build/lib.linux-x86_64-3.8/ldap/schema
copying Lib/ldap/schema/tokenizer.py -> build/lib.linux-x86_64-3.8/ldap/schema
copying Lib/ldap/schema/init.py -> build/lib.linux-x86_64-3.8/ldap/schema
copying Lib/ldap/schema/models.py -> build/lib.linux-x86_64-3.8/ldap/schema
copying Lib/ldap/schema/subentry.py -> build/lib.linux-x86_64-3.8/ldap/schema
creating build/lib.linux-x86_64-3.8/slapdtest
copying Lib/slapdtest/init.py -> build/lib.linux-x86_64-3.8/slapdtest
copying Lib/slapdtest/_slapdtest.py -> build/lib.linux-x86_64-3.8/slapdtest
running egg_info
writing Lib/python_ldap.egg-info/PKG-INFO
writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt
writing requirements to Lib/python_ldap.egg-info/requires.txt
writing top-level names to Lib/python_ldap.egg-info/top_level.txt
reading manifest file ‘Lib/python_ldap.egg-info/SOURCES.txt’
reading manifest template ‘MANIFEST.in’
no previously-included directories found matching ‘Doc/.build’
adding license file ‘LICENCE’
writing manifest file ‘Lib/python_ldap.egg-info/SOURCES.txt’
creating build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/README -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/ca.conf -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/ca.pem -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/client.conf -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/client.key -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/client.pem -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/gencerts.sh -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/gennssdb.sh -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/server.conf -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/server.key -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/server.pem -> build/lib.linux-x86_64-3.8/slapdtest/certs
running build_ext
building ‘_ldap’ extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/Modules
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=3.3.1 -DLDAPMODULE_AUTHOR=python-ldap project -DLDAPMODULE_LICENSE=Python style -IModules -I/home/lee/Desktop/annotation-tool/.venv/include -I/usr/include/python3.8 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-3.8/Modules/LDAPObject.o
In file included from Modules/LDAPObject.c:3:0:
Modules/common.h:9:10: fatal error: Python.h: No such file or directory
#include «Python.h»
^~~~~~~~~~
compilation terminated.
error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1
—————————————-
ERROR: Command errored out with exit status 1: /home/lee/Desktop/annotation-tool/.venv/bin/python3.8 -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘»‘»‘/tmp/pip-install-4yo5vsck/python-ldap_20f7ac56e284475b90fa2b70b3984878/setup.py'»‘»‘; file='»‘»‘/tmp/pip-install-4yo5vsck/python-ldap_20f7ac56e284475b90fa2b70b3984878/setup.py'»‘»‘;f = getattr(tokenize, ‘»‘»‘open'»‘»‘, open)(file) if os.path.exists(file) else io.StringIO(‘»‘»‘from setuptools import setup; setup()'»‘»‘);code = f.read().replace(‘»‘»‘rn'»‘»‘, ‘»‘»‘n'»‘»‘);f.close();exec(compile(code, file, ‘»‘»‘exec'»‘»‘))’ install —record /tmp/pip-record-5ga25n50/install-record.txt —single-version-externally-managed —compile —install-headers /home/lee/Desktop/annotation-tool/.venv/include/site/python3.8/python-ldap Check the logs for full command output.
Great after installed all the prerequisites python-ldap installed properly !!!
thanks
Did you use windows or other os ??
Collecting python-ldap
Using cached python-ldap-3.3.1.tar.gz (379 kB)
Preparing metadata (setup.py) … done
Requirement already satisfied: pyasn1>=0.3.7 in ./.venv/lib/python3.8/site-packages (from python-ldap) (0.4.8)
Requirement already satisfied: pyasn1_modules>=0.1.5 in ./.venv/lib/python3.8/site-packages (from python-ldap) (0.2.8)
Building wheels for collected packages: python-ldap
Building wheel for python-ldap (setup.py) … error
ERROR: Command errored out with exit status 1:
command: /home/lee/Desktop/annotation-tool/.venv/bin/python3.8 -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘»‘»‘/tmp/pip-install-4yo5vsck/python-ldap_20f7ac56e284475b90fa2b70b3984878/setup.py'»‘»‘; file='»‘»‘/tmp/pip-install-4yo5vsck/python-ldap_20f7ac56e284475b90fa2b70b3984878/setup.py'»‘»‘;f = getattr(tokenize, ‘»‘»‘open'»‘»‘, open)(file) if os.path.exists(file) else io.StringIO(‘»‘»‘from setuptools import setup; setup()'»‘»‘);code = f.read().replace(‘»‘»‘rn'»‘»‘, ‘»‘»‘n'»‘»‘);f.close();exec(compile(code, file, ‘»‘»‘exec'»‘»‘))’ bdist_wheel -d /tmp/pip-wheel-uwiw4jrm
cwd: /tmp/pip-install-4yo5vsck/python-ldap_20f7ac56e284475b90fa2b70b3984878/
Complete output (83 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
copying Lib/ldapurl.py -> build/lib.linux-x86_64-3.8
copying Lib/ldif.py -> build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/asyncsearch.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/modlist.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/pkginfo.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/constants.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/resiter.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/dn.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/cidict.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/init.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/logger.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/ldapobject.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/compat.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/filter.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/async.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/syncrepl.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/sasl.py -> build/lib.linux-x86_64-3.8/ldap
copying Lib/ldap/functions.py -> build/lib.linux-x86_64-3.8/ldap
creating build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/pagedresults.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/libldap.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/sss.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/openldap.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/readentry.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/init.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/psearch.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/deref.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/simple.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/pwdpolicy.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/sessiontrack.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/ppolicy.py -> build/lib.linux-x86_64-3.8/ldap/controls
copying Lib/ldap/controls/vlv.py -> build/lib.linux-x86_64-3.8/ldap/controls
creating build/lib.linux-x86_64-3.8/ldap/extop
copying Lib/ldap/extop/passwd.py -> build/lib.linux-x86_64-3.8/ldap/extop
copying Lib/ldap/extop/init.py -> build/lib.linux-x86_64-3.8/ldap/extop
copying Lib/ldap/extop/dds.py -> build/lib.linux-x86_64-3.8/ldap/extop
creating build/lib.linux-x86_64-3.8/ldap/schema
copying Lib/ldap/schema/tokenizer.py -> build/lib.linux-x86_64-3.8/ldap/schema
copying Lib/ldap/schema/init.py -> build/lib.linux-x86_64-3.8/ldap/schema
copying Lib/ldap/schema/models.py -> build/lib.linux-x86_64-3.8/ldap/schema
copying Lib/ldap/schema/subentry.py -> build/lib.linux-x86_64-3.8/ldap/schema
creating build/lib.linux-x86_64-3.8/slapdtest
copying Lib/slapdtest/init.py -> build/lib.linux-x86_64-3.8/slapdtest
copying Lib/slapdtest/_slapdtest.py -> build/lib.linux-x86_64-3.8/slapdtest
running egg_info
writing Lib/python_ldap.egg-info/PKG-INFO
writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt
writing requirements to Lib/python_ldap.egg-info/requires.txt
writing top-level names to Lib/python_ldap.egg-info/top_level.txt
reading manifest file ‘Lib/python_ldap.egg-info/SOURCES.txt’
reading manifest template ‘MANIFEST.in’
no previously-included directories found matching ‘Doc/.build’
adding license file ‘LICENCE’
writing manifest file ‘Lib/python_ldap.egg-info/SOURCES.txt’
creating build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/README -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/ca.conf -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/ca.pem -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/client.conf -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/client.key -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/client.pem -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/gencerts.sh -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/gennssdb.sh -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/server.conf -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/server.key -> build/lib.linux-x86_64-3.8/slapdtest/certs
copying Lib/slapdtest/certs/server.pem -> build/lib.linux-x86_64-3.8/slapdtest/certs
running build_ext
building ‘_ldap’ extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/Modules
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=3.3.1 -DLDAPMODULE_AUTHOR=python-ldap project -DLDAPMODULE_LICENSE=Python style -IModules -I/home/lee/Desktop/annotation-tool/.venv/include -I/usr/include/python3.8 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-3.8/Modules/LDAPObject.o
In file included from Modules/LDAPObject.c:3:0:
Modules/common.h:9:10: fatal error: Python.h: No such file or directory
#include «Python.h»
^~~~~~~~~~
compilation terminated.
error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1
ERROR: Failed building wheel for python-ldap Running setup.py clean for python-ldap Failed to build python-ldap Installing collected packages: python-ldap Running setup.py install for python-ldap … error ERROR: Command errored out with exit status 1: command: /home/lee/Desktop/annotation-tool/.venv/bin/python3.8 -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘»‘»‘/tmp/pip-install-4yo5vsck/python-ldap_20f7ac56e284475b90fa2b70b3984878/setup.py'»‘»‘; file='»‘»‘/tmp/pip-install-4yo5vsck/python-ldap_20f7ac56e284475b90fa2b70b3984878/setup.py'»‘»‘;f = getattr(tokenize, ‘»‘»‘open'»‘»‘, open)(file) if os.path.exists(file) else io.StringIO(‘»‘»‘from setuptools import setup; setup()'»‘»‘);code = f.read().replace(‘»‘»‘rn'»‘»‘, ‘»‘»‘n'»‘»‘);f.close();exec(compile(code, file, ‘»‘»‘exec'»‘»‘))’ install —record /tmp/pip-record-5ga25n50/install-record.txt —single-version-externally-managed —compile —install-headers /home/lee/Desktop/annotation-tool/.venv/include/site/python3.8/python-ldap cwd: /tmp/pip-install-4yo5vsck/python-ldap_20f7ac56e284475b90fa2b70b3984878/ Complete output (85 lines): running install /home/lee/Desktop/annotation-tool/.venv/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py creating build creating build/lib.linux-x86_64-3.8 copying Lib/ldapurl.py -> build/lib.linux-x86_64-3.8 copying Lib/ldif.py -> build/lib.linux-x86_64-3.8 creating build/lib.linux-x86_64-3.8/ldap copying Lib/ldap/asyncsearch.py -> build/lib.linux-x86_64-3.8/ldap copying Lib/ldap/modlist.py -> build/lib.linux-x86_64-3.8/ldap copying Lib/ldap/pkginfo.py -> build/lib.linux-x86_64-3.8/ldap copying Lib/ldap/constants.py -> build/lib.linux-x86_64-3.8/ldap copying Lib/ldap/resiter.py -> build/lib.linux-x86_64-3.8/ldap copying Lib/ldap/dn.py -> build/lib.linux-x86_64-3.8/ldap copying Lib/ldap/cidict.py -> build/lib.linux-x86_64-3.8/ldap copying Lib/ldap/init.py -> build/lib.linux-x86_64-3.8/ldap copying Lib/ldap/logger.py -> build/lib.linux-x86_64-3.8/ldap copying Lib/ldap/ldapobject.py -> build/lib.linux-x86_64-3.8/ldap copying Lib/ldap/compat.py -> build/lib.linux-x86_64-3.8/ldap copying Lib/ldap/filter.py -> build/lib.linux-x86_64-3.8/ldap copying Lib/ldap/async.py -> build/lib.linux-x86_64-3.8/ldap copying Lib/ldap/syncrepl.py -> build/lib.linux-x86_64-3.8/ldap copying Lib/ldap/sasl.py -> build/lib.linux-x86_64-3.8/ldap copying Lib/ldap/functions.py -> build/lib.linux-x86_64-3.8/ldap creating build/lib.linux-x86_64-3.8/ldap/controls copying Lib/ldap/controls/pagedresults.py -> build/lib.linux-x86_64-3.8/ldap/controls copying Lib/ldap/controls/libldap.py -> build/lib.linux-x86_64-3.8/ldap/controls copying Lib/ldap/controls/sss.py -> build/lib.linux-x86_64-3.8/ldap/controls copying Lib/ldap/controls/openldap.py -> build/lib.linux-x86_64-3.8/ldap/controls copying Lib/ldap/controls/readentry.py -> build/lib.linux-x86_64-3.8/ldap/controls copying Lib/ldap/controls/init.py -> build/lib.linux-x86_64-3.8/ldap/controls copying Lib/ldap/controls/psearch.py -> build/lib.linux-x86_64-3.8/ldap/controls copying Lib/ldap/controls/deref.py -> build/lib.linux-x86_64-3.8/ldap/controls copying Lib/ldap/controls/simple.py -> build/lib.linux-x86_64-3.8/ldap/controls copying Lib/ldap/controls/pwdpolicy.py -> build/lib.linux-x86_64-3.8/ldap/controls copying Lib/ldap/controls/sessiontrack.py -> build/lib.linux-x86_64-3.8/ldap/controls copying Lib/ldap/controls/ppolicy.py -> build/lib.linux-x86_64-3.8/ldap/controls copying Lib/ldap/controls/vlv.py -> build/lib.linux-x86_64-3.8/ldap/controls creating build/lib.linux-x86_64-3.8/ldap/extop copying Lib/ldap/extop/passwd.py -> build/lib.linux-x86_64-3.8/ldap/extop copying Lib/ldap/extop/init.py -> build/lib.linux-x86_64-3.8/ldap/extop copying Lib/ldap/extop/dds.py -> build/lib.linux-x86_64-3.8/ldap/extop creating build/lib.linux-x86_64-3.8/ldap/schema copying Lib/ldap/schema/tokenizer.py -> build/lib.linux-x86_64-3.8/ldap/schema copying Lib/ldap/schema/init.py -> build/lib.linux-x86_64-3.8/ldap/schema copying Lib/ldap/schema/models.py -> build/lib.linux-x86_64-3.8/ldap/schema copying Lib/ldap/schema/subentry.py -> build/lib.linux-x86_64-3.8/ldap/schema creating build/lib.linux-x86_64-3.8/slapdtest copying Lib/slapdtest/init.py -> build/lib.linux-x86_64-3.8/slapdtest copying Lib/slapdtest/_slapdtest.py -> build/lib.linux-x86_64-3.8/slapdtest running egg_info writing Lib/python_ldap.egg-info/PKG-INFO writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt writing requirements to Lib/python_ldap.egg-info/requires.txt writing top-level names to Lib/python_ldap.egg-info/top_level.txt reading manifest file ‘Lib/python_ldap.egg-info/SOURCES.txt’ reading manifest template ‘MANIFEST.in’ no previously-included directories found matching ‘Doc/.build’ adding license file ‘LICENCE’ writing manifest file ‘Lib/python_ldap.egg-info/SOURCES.txt’ creating build/lib.linux-x86_64-3.8/slapdtest/certs copying Lib/slapdtest/certs/README -> build/lib.linux-x86_64-3.8/slapdtest/certs copying Lib/slapdtest/certs/ca.conf -> build/lib.linux-x86_64-3.8/slapdtest/certs copying Lib/slapdtest/certs/ca.pem -> build/lib.linux-x86_64-3.8/slapdtest/certs copying Lib/slapdtest/certs/client.conf -> build/lib.linux-x86_64-3.8/slapdtest/certs copying Lib/slapdtest/certs/client.key -> build/lib.linux-x86_64-3.8/slapdtest/certs copying Lib/slapdtest/certs/client.pem -> build/lib.linux-x86_64-3.8/slapdtest/certs copying Lib/slapdtest/certs/gencerts.sh -> build/lib.linux-x86_64-3.8/slapdtest/certs copying Lib/slapdtest/certs/gennssdb.sh -> build/lib.linux-x86_64-3.8/slapdtest/certs copying Lib/slapdtest/certs/server.conf -> build/lib.linux-x86_64-3.8/slapdtest/certs copying Lib/slapdtest/certs/server.key -> build/lib.linux-x86_64-3.8/slapdtest/certs copying Lib/slapdtest/certs/server.pem -> build/lib.linux-x86_64-3.8/slapdtest/certs running build_ext building ‘_ldap’ extension creating build/temp.linux-x86_64-3.8 creating build/temp.linux-x86_64-3.8/Modules x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=3.3.1 -DLDAPMODULE_AUTHOR=python-ldap project -DLDAPMODULE_LICENSE=Python style -IModules -I/home/lee/Desktop/annotation-tool/.venv/include -I/usr/include/python3.8 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-3.8/Modules/LDAPObject.o In file included from Modules/LDAPObject.c:3:0: Modules/common.h:9:10: fatal error: Python.h: No such file or directory #include «Python.h» ^~~~~~~~~~ compilation terminated. error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1 —————————————- ERROR: Command errored out with exit status 1: /home/lee/Desktop/annotation-tool/.venv/bin/python3.8 -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘»‘»‘/tmp/pip-install-4yo5vsck/python-ldap_20f7ac56e284475b90fa2b70b3984878/setup.py'»‘»‘; file='»‘»‘/tmp/pip-install-4yo5vsck/python-ldap_20f7ac56e284475b90fa2b70b3984878/setup.py'»‘»‘;f = getattr(tokenize, ‘»‘»‘open'»‘»‘, open)(file) if os.path.exists(file) else io.StringIO(‘»‘»‘from setuptools import setup; setup()'»‘»‘);code = f.read().replace(‘»‘»‘rn'»‘»‘, ‘»‘»‘n'»‘»‘);f.close();exec(compile(code, file, ‘»‘»‘exec'»‘»‘))’ install —record /tmp/pip-record-5ga25n50/install-record.txt —single-version-externally-managed —compile —install-headers /home/lee/Desktop/annotation-tool/.venv/include/site/python3.8/python-ldap Check the logs for full command output.
Hi jatin , I am also facing the same issue right now . Could you tell me if you got to solve that issue ?
@Saivikaskillamsetty you need to install all dependencies (including a python development environment — something like python3-dev, depends on your distro)
wich dependecies? only python3-dev?
i’m trying to run my django project but i got this issue:
`pip install django-auth-ldap
Collecting django-auth-ldap
Using cached django_auth_ldap-4.0.0-py3-none-any.whl (20 kB)
Collecting python-ldap>=3.1
Using cached python-ldap-3.4.0.tar.gz (376 kB)
Installing build dependencies … done
Getting requirements to build wheel … done
Preparing metadata (pyproject.toml) … done
Requirement already satisfied: Django>=2.2 in ./.virtualenvs/intranet/lib/python3.9/site-packages (from django-auth-ldap) (4.0.3)
Requirement already satisfied: sqlparse>=0.2.2 in ./.virtualenvs/intranet/lib/python3.9/site-packages (from Django>=2.2->django-auth-ldap) (0.4.2)
Requirement already satisfied: asgiref<4,>=3.4.1 in ./.virtualenvs/intranet/lib/python3.9/site-packages (from Django>=2.2->django-auth-ldap) (3.5.0)
Collecting pyasn1-modules>=0.1.5
Using cached pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
Collecting pyasn1>=0.3.7
Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Building wheels for collected packages: python-ldap
Building wheel for python-ldap (pyproject.toml) … error
error: subprocess-exited-with-error
× Building wheel for python-ldap (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [83 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
copying Lib/ldapurl.py -> build/lib.linux-x86_64-3.9
copying Lib/ldif.py -> build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/modlist.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/ldapobject.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/compat.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/init.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/constants.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/functions.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/filter.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/dn.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/pkginfo.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/cidict.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/logger.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/async.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/syncrepl.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/resiter.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/sasl.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/asyncsearch.py -> build/lib.linux-x86_64-3.9/ldap
creating build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/init.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/pwdpolicy.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/openldap.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/deref.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/ppolicy.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/vlv.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/psearch.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/pagedresults.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/readentry.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/simple.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/libldap.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/sss.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/sessiontrack.py -> build/lib.linux-x86_64-3.9/ldap/controls
creating build/lib.linux-x86_64-3.9/ldap/extop
copying Lib/ldap/extop/init.py -> build/lib.linux-x86_64-3.9/ldap/extop
copying Lib/ldap/extop/dds.py -> build/lib.linux-x86_64-3.9/ldap/extop
copying Lib/ldap/extop/passwd.py -> build/lib.linux-x86_64-3.9/ldap/extop
creating build/lib.linux-x86_64-3.9/ldap/schema
copying Lib/ldap/schema/init.py -> build/lib.linux-x86_64-3.9/ldap/schema
copying Lib/ldap/schema/models.py -> build/lib.linux-x86_64-3.9/ldap/schema
copying Lib/ldap/schema/tokenizer.py -> build/lib.linux-x86_64-3.9/ldap/schema
copying Lib/ldap/schema/subentry.py -> build/lib.linux-x86_64-3.9/ldap/schema
creating build/lib.linux-x86_64-3.9/slapdtest
copying Lib/slapdtest/_slapdtest.py -> build/lib.linux-x86_64-3.9/slapdtest
copying Lib/slapdtest/init.py -> build/lib.linux-x86_64-3.9/slapdtest
running egg_info
writing Lib/python_ldap.egg-info/PKG-INFO
writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt
writing requirements to Lib/python_ldap.egg-info/requires.txt
writing top-level names to Lib/python_ldap.egg-info/top_level.txt
reading manifest file ‘Lib/python_ldap.egg-info/SOURCES.txt’
reading manifest template ‘MANIFEST.in’
no previously-included directories found matching ‘Doc/.build’
adding license file ‘LICENCE’
writing manifest file ‘Lib/python_ldap.egg-info/SOURCES.txt’
creating build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/README -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/ca.conf -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/ca.pem -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/client.conf -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/client.key -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/client.pem -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/gencerts.sh -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/gennssdb.sh -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/server.conf -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/server.key -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/server.pem -> build/lib.linux-x86_64-3.9/slapdtest/certs
running build_ext
building ‘_ldap’ extension
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/Modules
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=3.4.0 «-DLDAPMODULE_AUTHOR=python-ldap project» «-DLDAPMODULE_LICENSE=Python style» -IModules -I/home/lucas/.virtualenvs/intranet/include -I/usr/local/include/python3.9 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-3.9/Modules/LDAPObject.o
In file included from Modules/LDAPObject.c:3:
Modules/common.h:15:10: fatal error: lber.h: Arquivo ou diretório inexistente
15 | #include <lber.h>
| ^~~~~~~~
compilation terminated.
error: command ‘/usr/bin/gcc’ failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for python-ldap
Failed to build python-ldap
ERROR: Could not build wheels for python-ldap, which is required to install pyproject.toml-based projects
`
In windows i can install the lib if i install the archive .whl, i think in ubuntu it doesnt build the binaries
This steps worked for me on Kali 2022
─# apt-get update -y
└─# apt-get install build-essential python3-dev python2.7-dev libldap2-dev libsasl2-dev slapd ldap-utils tox lcov valgrind
└─# apt-get update -y
└─# pip install python-ldap
And whalaaaaa, its working
medeiroslucass, constantino382, adocampo, mr-propre, eMuzhichenko, Yoshyhyrro, shatal0v, TAI-REx, zhanglianxin, trinanda, and 4 more reacted with heart emoji
trinanda and byinarie reacted with rocket emoji
Содержание
- Pip install python ldap error
- ERROR: Could not build wheels for python-ldap in Python #
- Create a virtual environment #
- Try running pip install in verbose mode #
- Conclusion #
- Unable to install on Windows 10: fatal error C1083: Cannot open include file: ‘lber.h’ #243
- Comments
- Unable to install on Windows 10, I tried
- Cant pip python-ldap on 3.6 #297
- Comments
- Use the Python3.6 image
- Set the working directory to /app
- Copy the current directory contents into the container at /app
- Install the dependencies
- run the command to start uWSGI
- Installing python-ldap¶
- Installing from PyPI¶
- Pre-built Binaries¶
- openSUSE Linux¶
- Debian Linux¶
- Windows¶
- FreeBSD¶
- macOS¶
- Installing from Source¶
- Build prerequisites¶
Pip install python ldap error
Reading time В· 4 min
ERROR: Could not build wheels for python-ldap in Python #
To solve the error «Could not build wheels for python-ldap», run the pip install —upgrade pip command to upgrade your pip version and rerun the pip install python-ldap command.
First, make sure to install the prerequisites.
The most common cause of the error is having an outdated version of pip .
Here are the commands for upgrading pip on all operating systems.
Which command works depends on your operating system and your version of Python.
Now that pip is upgraded, try to run the pip install python-ldap command.
If the error is not resolved, upgrade the setuptools and wheel packages as well.
Try to rerun the pip install command after upgrading setuptools and wheel .
If that didn’t help, try to run the pip install command with the —upgrade option.
If the error is not resolved, try installing the package with the —no-cache-dir option to disable the cache.
If that didn’t help, use the —pre option to include pre-release and development versions of the package.
The —pre option makes it so pip includes pre-release and development versions of the package. By default pip only finds stable versions.
If the error is not resolved, try running the pip install command with the —no-use-pep517 option.
If that didn’t help, try installing another version of python-ldap .
You can check the available versions of a package by running the pip install package== command.
The output contains a tuple of all of the versions of the package from the oldest to the most recent version.
Pick another version of the package and try installing it. Here is an example.
If that didn’t help, try creating a virtual environment.
Create a virtual environment #
To solve the «Could not build wheels for python-ldap» error:
- Create a virtual environment.
- Activate the virtual environment.
- Run the pip install command with the virtual environment active.
If the python3 -m venv venv command doesn’t work, try the following 2 commands:
- python -m venv venv
- py -m venv venv
Make sure to use the correct command to activate your virtual environment depending on your operating system and your shell.
Your virtual environment will use the version of Python that was used to create it.
Try running pip install in verbose mode #
If none of the suggestions helped, try running the pip install command in verbose mode.
The -v option stands for verbose mode and can be used up to 3 times.
When the pip install command is run in verbose mode, the command shows more output and how the error occurred.
Conclusion #
To solve the error «Could not build wheels for python-ldap», run the pip install —upgrade pip command to upgrade your pip version and rerun the pip install python-ldap command.
Источник
Unable to install on Windows 10: fatal error C1083: Cannot open include file: ‘lber.h’ #243
Unable to install on Windows 10, I tried
Issue description:
Whenever I run: pip install python-ldap
I get the following:
c:usersuserappdatalocaltemppip-install-652a07b0python-ldapmodulesconstants.h(7): fatal error C1083: Cannot open include file: ‘lber.h’: No such file or directory
error: command ‘C:Program Files (x86)Microsoft Visual Studio2017BuildToolsVCToolsMSVC14.15.26726binHostX86x86cl.exe’ failed with exit status 2
Command «»c:program files (x86)python36-32python.exe» -u -c «import setuptools, tokenize;file=’C:UsersuserAppDataLocalTemppip-install-652a07b0python-ldapsetup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘rn’, ‘n’);f.close();exec(compile(code, file, ‘exec’))» install —record C:UsersuserAppDataLocalTemppip-record-09ceypm_install-record.txt —single-version-externally-managed —compile» failed with error code 1 in C:UsersuserAppDataLocalTemppip-install-652a07b0python-ldap
pyldap-3.0.0-py2.py3-none-any.whl is not a supported wheel on this platform.
- Also looked into requirements: https://www.python-ldap.org/en/latest/installing.html#build-prerequisites
I downloaded the OpenLDAP client libs but didn’t know where to place it’s folder ?
Steps to reproduce:
pip install python-ldap
Operating system: Windows 10, version 1803, OS Build 171134.285
Python version: Python 3.6.5
python-ldap version: None
Any ideas how to proceed ?
The text was updated successfully, but these errors were encountered:
Источник
Cant pip python-ldap on 3.6 #297
If you found a bug in python-ldap, or would request a new feature,
this is the place to let us know.
Please describe the issue and your environment here.
Im running in a docker env, single app single python instance 3.6 I cant deploy python-ldap in python3.6 env
Use the Python3.6 image
Set the working directory to /app
Copy the current directory contents into the container at /app
Install the dependencies
RUN pip3 install -r requirements.txt
run the command to start uWSGI
CMD [«uwsgi», «app.ini»]
Running setup.py install for python-ldap: started
Running setup.py install for python-ldap: finished with status ‘error’
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘»‘»‘/tmp/pip-install-ni8_pla_/python-ldap/setup.py’»‘»‘; file=’»‘»‘/tmp/pip-install-ni8_pla_/python-ldap/setup.py’»‘»‘;f=getattr(tokenize, ‘»‘»‘open’»‘»‘, open)(file);code=f.read().replace(‘»‘»‘rn’»‘»‘, ‘»‘»‘n’»‘»‘);f.close();exec(compile(code, file, ‘»‘»‘exec’»‘»‘))’ install —record /tmp/pip-record-gma0a6c1/install-record.txt —single-version-externally-managed —compile
cwd: /tmp/pip-install-ni8_pla_/python-ldap/
Complete output (81 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
copying Lib/ldapurl.py -> build/lib.linux-x86_64-3.6
copying Lib/ldif.py -> build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/filter.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/dn.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/syncrepl.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/resiter.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/pkginfo.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/async.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/modlist.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/logger.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/sasl.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/functions.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/compat.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/cidict.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/init.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/ldapobject.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/asyncsearch.py -> build/lib.linux-x86_64-3.6/ldap
copying Lib/ldap/constants.py -> build/lib.linux-x86_64-3.6/ldap
creating build/lib.linux-x86_64-3.6/ldap/controls
copying Lib/ldap/controls/readentry.py -> build/lib.linux-x86_64-3.6/ldap/controls
copying Lib/ldap/controls/ppolicy.py -> build/lib.linux-x86_64-3.6/ldap/controls
copying Lib/ldap/controls/pagedresults.py -> build/lib.linux-x86_64-3.6/ldap/controls
copying Lib/ldap/controls/simple.py -> build/lib.linux-x86_64-3.6/ldap/controls
copying Lib/ldap/controls/psearch.py -> build/lib.linux-x86_64-3.6/ldap/controls
copying Lib/ldap/controls/libldap.py -> build/lib.linux-x86_64-3.6/ldap/controls
copying Lib/ldap/controls/sss.py -> build/lib.linux-x86_64-3.6/ldap/controls
copying Lib/ldap/controls/vlv.py -> build/lib.linux-x86_64-3.6/ldap/controls
copying Lib/ldap/controls/deref.py -> build/lib.linux-x86_64-3.6/ldap/controls
copying Lib/ldap/controls/sessiontrack.py -> build/lib.linux-x86_64-3.6/ldap/controls
copying Lib/ldap/controls/init.py -> build/lib.linux-x86_64-3.6/ldap/controls
copying Lib/ldap/controls/openldap.py -> build/lib.linux-x86_64-3.6/ldap/controls
copying Lib/ldap/controls/pwdpolicy.py -> build/lib.linux-x86_64-3.6/ldap/controls
creating build/lib.linux-x86_64-3.6/ldap/extop
copying Lib/ldap/extop/init.py -> build/lib.linux-x86_64-3.6/ldap/extop
copying Lib/ldap/extop/dds.py -> build/lib.linux-x86_64-3.6/ldap/extop
creating build/lib.linux-x86_64-3.6/ldap/schema
copying Lib/ldap/schema/subentry.py -> build/lib.linux-x86_64-3.6/ldap/schema
copying Lib/ldap/schema/models.py -> build/lib.linux-x86_64-3.6/ldap/schema
copying Lib/ldap/schema/init.py -> build/lib.linux-x86_64-3.6/ldap/schema
copying Lib/ldap/schema/tokenizer.py -> build/lib.linux-x86_64-3.6/ldap/schema
creating build/lib.linux-x86_64-3.6/slapdtest
copying Lib/slapdtest/slapdtest.py -> build/lib.linux-x86_64-3.6/slapdtest
copying Lib/slapdtest/init.py -> build/lib.linux-x86_64-3.6/slapdtest
running egg_info
writing Lib/python_ldap.egg-info/PKG-INFO
writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt
writing requirements to Lib/python_ldap.egg-info/requires.txt
writing top-level names to Lib/python_ldap.egg-info/top_level.txt
reading manifest file ‘Lib/python_ldap.egg-info/SOURCES.txt’
reading manifest template ‘MANIFEST.in’
no previously-included directories found matching ‘Doc/.build’
writing manifest file ‘Lib/python_ldap.egg-info/SOURCES.txt’
creating build/lib.linux-x86_64-3.6/slapdtest/certs
copying Lib/slapdtest/certs/README -> build/lib.linux-x86_64-3.6/slapdtest/certs
copying Lib/slapdtest/certs/ca.conf -> build/lib.linux-x86_64-3.6/slapdtest/certs
copying Lib/slapdtest/certs/ca.pem -> build/lib.linux-x86_64-3.6/slapdtest/certs
copying Lib/slapdtest/certs/client.conf -> build/lib.linux-x86_64-3.6/slapdtest/certs
copying Lib/slapdtest/certs/client.key -> build/lib.linux-x86_64-3.6/slapdtest/certs
copying Lib/slapdtest/certs/client.pem -> build/lib.linux-x86_64-3.6/slapdtest/certs
copying Lib/slapdtest/certs/gencerts.sh -> build/lib.linux-x86_64-3.6/slapdtest/certs
copying Lib/slapdtest/certs/gennssdb.sh -> build/lib.linux-x86_64-3.6/slapdtest/certs
copying Lib/slapdtest/certs/server.conf -> build/lib.linux-x86_64-3.6/slapdtest/certs
copying Lib/slapdtest/certs/server.key -> build/lib.linux-x86_64-3.6/slapdtest/certs
copying Lib/slapdtest/certs/server.pem -> build/lib.linux-x86_64-3.6/slapdtest/certs
running build_ext
building ‘ldap’ extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/Modules
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=3.2.0 -DLDAPMODULE_AUTHOR=python-ldap project -DLDAPMODULE_LICENSE=Python style -IModules -I/usr/local/include/python3.6m -c Modules/LDAPObject.c -o build/temp.linux-x86_64-3.6/Modules/LDAPObject.o
In file included from Modules/LDAPObject.c:8:
Modules/constants.h:7:10: fatal error: lber.h: No such file or directory
#include «lber.h»
^
compilation terminated.
error: command ‘gcc’ failed with exit status 1
—————————————-
ERROR: Command errored out with exit status 1: /usr/local/bin/python -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘»‘»‘/tmp/pip-install-ni8_pla/python-ldap/setup.py’»‘»‘; file=’»‘»‘/tmp/pip-install-ni8_pla/python-ldap/setup.py’»‘»‘;f=getattr(tokenize, ‘»‘»‘open’»‘»‘, open)(file);code=f.read().replace(‘»‘»‘rn’»‘»‘, ‘»‘»‘n’»‘»‘);f.close();exec(compile(code, file, ‘»‘»‘exec’»‘»‘))’ install —record /tmp/pip-record-gma0a6c1/install-record.txt —single-version-externally-managed —compile Check the logs for full command output.
ERROR: Service ‘flask’ failed to build: The command ‘/bin/sh -c pip3 install -r requirements.txt’ returned a non-zero code: 1
i followed what was recommended in the following and no change
when I try to pip before launching docker-compose it clearly shows its installed
(env) root@pdc-mgmt-netauto:/home/administrator/app/flask# pip install python-ldap
Requirement already satisfied: python-ldap in ./env/lib/python3.6/site-packages (3.2.0)
Requirement already satisfied: pyasn1>=0.3.7 in ./env/lib/python3.6/site-packages (from python-ldap) (0.4.6)
Requirement already satisfied: pyasn1_modules>=0.1.5 in ./env/lib/python3.6/site-packages (from python-ldap) (0.2.6)
also lber.h is also installed
(env) root@pdc-mgmt-netauto:/home/administrator/app/flask# apt-file search lber.h
golang-openldap-dev: /usr/share/gocode/src/github.com/mqu/openldap/_docs/include/lber.h
libldap2-dev: /usr/include/lber.h
Operating system:
Ubuntu 18.04
Python version:
(env) root@pdc-mgmt-netauto:/home/administrator/app/flask# python -V
Python 3.6.8
python-ldap 3.2.0
Think thats what its getting, should be pulling the dependency for flask-simpleldap
not sure how too check
The text was updated successfully, but these errors were encountered:
Источник
Installing python-ldap¶
Installing from PyPI¶
The preferred point for downloading the “official” source distribution is the PyPI repository which supports installing via pip. For example:
For installing from PyPI, you will need the same Build prerequisites as when installing from source.
We do not currently provide pre-built packages (wheels).
Furthermore, python-ldap requires the modules pyasn1 and pyasn1-modules. pip will install these automatically.
Pre-built Binaries¶
Because distributions seem to be all over the place, this page tries to list all the current ones we know of.
Note that the python-ldap team is not responsible for the binary packages except the sources you can grab from the PyPI page. Also note that binary packages are most times not up to date. If you experience troubles with a binary package, it would be nice if you try to build a recent version of python-ldap before submitting a bug report to make sure you did not hit a problem already fixed in recent releases.
openSUSE Linux¶
Ships with python-ldap and there’s an additional download repository which contains builds of latest releases (see also OBS package).
Debian Linux¶
Have a look into the Debian Package Tracker to get up to date information which versions are available.
Windows¶
Unofficial packages for Windows are available on Christoph Gohlke’s page.
FreeBSD¶
The CVS repository of FreeBSD contains the package py-ldap
macOS¶
You can install directly with pip:
Installing from Source¶
python-ldap is built and installed using the Python setuptools. From a source repository:
If you have more than one Python interpreter installed locally, you should use the same one you plan to use python-ldap with.
Further instructions can be found in Setuptools documentation .
Build prerequisites¶
The following software packages are required to be installed on the local system when building python-ldap:
- Python version 2.7, or 3.4 or later including its development files
- C compiler corresponding to your Python version (on Linux, it is usually gcc )
- OpenLDAP client libs version 2.4.11 or later; it is not possible and not supported to build with prior versions.
- OpenSSL (optional)
- Cyrus SASL (optional)
- Kerberos libraries, MIT or Heimdal (optional)
Источник
I’m trying to install the python-ldap package with PyCharm and it is not working out, i get the following error:
Error Message:
Collecting python-ldap
Using cached https://files.pythonhosted.org/packages/7f/1c/28d721dff2fcd2fef9d55b40df63a00be26ec8a11e8c6fc612ae642f9cfd/python-ldap-3.1.0.tar.gz
Collecting pyasn1>=0.3.7 (from python-ldap)
Using cached https://files.pythonhosted.org/packages/a0/70/2c27740f08e477499ce19eefe05dbcae6f19fdc49e9e82ce4768be0643b9/pyasn1-0.4.3-py2.py3-none-any.whl
Collecting pyasn1_modules>=0.1.5 (from python-ldap)
Using cached https://files.pythonhosted.org/packages/e9/51/bcd96bf6231d4b2cc5e023c511bee86637ba375c44a6f9d1b4b7ad1ce4b9/pyasn1_modules-0.2.1-py2.py3-none-any.whl
Installing collected packages: pyasn1, pyasn1-modules, python-ldap
Running setup.py install for python-ldap: started
Running setup.py install for python-ldap: finished with status ‘error’
Complete output from command C:UsersJoanPycharmProjectspruebavenvScriptspython.exe -u -c «import setuptools, tokenize;file=’C:UsersJoanAppDataLocalTemppycharm-packagingpython-ldapsetup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘rn’, ‘n’);f.close();exec(compile(code, file, ‘exec’))» install —record C:UsersJoanAppDataLocalTemppip-record-y2ot_u84install-record.txt —single-version-externally-managed —compile —install-headers C:UsersJoanPycharmProjectspruebavenvincludesitepython3.6python-ldap:
running install
running build
running build_py
creating buildlib.win-amd64-3.6
copying Libldapurl.py -> buildlib.win-amd64-3.6
copying Libldif.py -> buildlib.win-amd64-3.6
creating buildlib.win-amd64-3.6ldap
copying Libldapasync.py -> buildlib.win-amd64-3.6ldap
copying Libldapasyncsearch.py -> buildlib.win-amd64-3.6ldap
copying Libldapcidict.py -> buildlib.win-amd64-3.6ldap
copying Libldapcompat.py -> buildlib.win-amd64-3.6ldap
copying Libldapconstants.py -> buildlib.win-amd64-3.6ldap
copying Libldapdn.py -> buildlib.win-amd64-3.6ldap
copying Libldapfilter.py -> buildlib.win-amd64-3.6ldap
copying Libldapfunctions.py -> buildlib.win-amd64-3.6ldap
copying Libldapldapobject.py -> buildlib.win-amd64-3.6ldap
copying Libldaplogger.py -> buildlib.win-amd64-3.6ldap
copying Libldapmodlist.py -> buildlib.win-amd64-3.6ldap
copying Libldappkginfo.py -> buildlib.win-amd64-3.6ldap
copying Libldapresiter.py -> buildlib.win-amd64-3.6ldap
copying Libldapsasl.py -> buildlib.win-amd64-3.6ldap
copying Libldapsyncrepl.py -> buildlib.win-amd64-3.6ldap
copying Libldap__init__.py -> buildlib.win-amd64-3.6ldap
creating buildlib.win-amd64-3.6ldapcontrols
copying Libldapcontrolsderef.py -> buildlib.win-amd64-3.6ldapcontrols
copying Libldapcontrolslibldap.py -> buildlib.win-amd64-3.6ldapcontrols
copying Libldapcontrolsopenldap.py -> buildlib.win-amd64-3.6ldapcontrols
copying Libldapcontrolspagedresults.py -> buildlib.win-amd64-3.6ldapcontrols
copying Libldapcontrolsppolicy.py -> buildlib.win-amd64-3.6ldapcontrols
copying Libldapcontrolspsearch.py -> buildlib.win-amd64-3.6ldapcontrols
copying Libldapcontrolspwdpolicy.py -> buildlib.win-amd64-3.6ldapcontrols
copying Libldapcontrolsreadentry.py -> buildlib.win-amd64-3.6ldapcontrols
copying Libldapcontrolssessiontrack.py -> buildlib.win-amd64-3.6ldapcontrols
copying Libldapcontrolssimple.py -> buildlib.win-amd64-3.6ldapcontrols
copying Libldapcontrolssss.py -> buildlib.win-amd64-3.6ldapcontrols
copying Libldapcontrolsvlv.py -> buildlib.win-amd64-3.6ldapcontrols
copying Libldapcontrols__init__.py -> buildlib.win-amd64-3.6ldapcontrols
creating buildlib.win-amd64-3.6ldapextop
copying Libldapextopdds.py -> buildlib.win-amd64-3.6ldapextop
copying Libldapextop__init__.py -> buildlib.win-amd64-3.6ldapextop
creating buildlib.win-amd64-3.6ldapschema
copying Libldapschemamodels.py -> buildlib.win-amd64-3.6ldapschema
copying Libldapschemasubentry.py -> buildlib.win-amd64-3.6ldapschema
copying Libldapschematokenizer.py -> buildlib.win-amd64-3.6ldapschema
copying Libldapschema__init__.py -> buildlib.win-amd64-3.6ldapschema
creating buildlib.win-amd64-3.6slapdtest
copying Libslapdtest_slapdtest.py -> buildlib.win-amd64-3.6slapdtest
copying Libslapdtest__init__.py -> buildlib.win-amd64-3.6slapdtest
running egg_info
writing Libpython_ldap.egg-infoPKG-INFO
writing dependency_links to Libpython_ldap.egg-infodependency_links.txt
writing requirements to Libpython_ldap.egg-inforequires.txt
writing top-level names to Libpython_ldap.egg-infotop_level.txt
reading manifest file ‘Libpython_ldap.egg-infoSOURCES.txt’
reading manifest template ‘MANIFEST.in’
no previously-included directories found matching ‘Doc.build’
writing manifest file ‘Libpython_ldap.egg-infoSOURCES.txt’
creating buildlib.win-amd64-3.6slapdtestcerts
copying LibslapdtestcertsREADME -> buildlib.win-amd64-3.6slapdtestcerts
copying Libslapdtestcertsca.conf -> buildlib.win-amd64-3.6slapdtestcerts
copying Libslapdtestcertsca.pem -> buildlib.win-amd64-3.6slapdtestcerts
copying Libslapdtestcertsclient.conf -> buildlib.win-amd64-3.6slapdtestcerts
copying Libslapdtestcertsclient.key -> buildlib.win-amd64-3.6slapdtestcerts
copying Libslapdtestcertsclient.pem -> buildlib.win-amd64-3.6slapdtestcerts
copying Libslapdtestcertsgencerts.sh -> buildlib.win-amd64-3.6slapdtestcerts
copying Libslapdtestcertsgennssdb.sh -> buildlib.win-amd64-3.6slapdtestcerts
copying Libslapdtestcertsserver.conf -> buildlib.win-amd64-3.6slapdtestcerts
copying Libslapdtestcertsserver.key -> buildlib.win-amd64-3.6slapdtestcerts
copying Libslapdtestcertsserver.pem -> buildlib.win-amd64-3.6slapdtestcerts
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building '_ldap' extension
creating buildtemp.win-amd64-3.6
creating buildtemp.win-amd64-3.6Release
creating buildtemp.win-amd64-3.6ReleaseModules
C:Program Files (x86)Microsoft Visual Studio 14.0VCBINx86_amd64cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=3.1.0 "-DLDAPMODULE_AUTHOR=python-ldap project" "-DLDAPMODULE_LICENSE=Python style" -IModules -IC:UsersJoanPycharmProjectspruebavenvinclude -IC:UsersJoanAppDataLocalProgramsPythonPython36include -IC:UsersJoanAppDataLocalProgramsPythonPython36include "-IC:Program Files (x86)Microsoft Visual Studio 14.0VCINCLUDE" "-IC:Program Files (x86)Windows Kits10include10.0.10240.0ucrt" "-IC:Program Files (x86)Windows KitsNETFXSDK4.6.1includeum" "-IC:Program Files (x86)Windows Kits8.1includeshared" "-IC:Program Files (x86)Windows Kits8.1includeum" "-IC:Program Files (x86)Windows Kits8.1includewinrt" /TcModules/LDAPObject.c /Fobuildtemp.win-amd64-3.6ReleaseModules/LDAPObject.obj
LDAPObject.c
c:usersjoanappdatalocaltemppycharm-packagingpython-ldapmodulesconstants.h(7): fatal error C1083: Cannot open include file: 'lber.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2
----------------------------------------
Command «C:UsersJoanPycharmProjectspruebavenvScriptspython.exe -u -c «import setuptools, tokenize;file=’C:UsersJoanAppDataLocalTemppycharm-packagingpython-ldapsetup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘rn’, ‘n’);f.close();exec(compile(code, file, ‘exec’))» install —record C:UsersJoanAppDataLocalTemppip-record-y2ot_u84install-record.txt —single-version-externally-managed —compile —install-headers C:UsersJoanPycharmProjectspruebavenvincludesitepython3.6python-ldap» failed with error code 1 in C:UsersJoanAppDataLocalTemppycharm-packagingpython-ldap
I’ll appreciate all the help,
thank you in advance!
<< All Blog Posts
- LDAP
- Buildout
- Plone
- Deployment
Installing python-ldap with buildout and a system installed OpenLDAP
In our use of buildout, we try not to compile every dependent library that is needed. One example of this is LDAP. Instead of putting the responsibility of upgrading OpenLDAP on the buildout, we depend on the OS specific package managers to take care of this. There are several reasons you would want to do this:
- Upgrading does not require any changes to your application’s build
- OS specific patches will be applied
- OS specific configuration arguments will be handled by the package manager
- Dependencies will be handled by the package manager
If you are using zc.buildout, then you can use the zc.recipe.egg recipe to ensure the package gets the proper library paths. Right now, if you try to install python-ldap on FreeBSD, you will get an error.
$ mkvirtualenv ldap
(ldap)$ pip install python-ldap
Downloading/unpacking python-ldap
Downloading python-ldap-2.3.12.tar.gz (112Kb): 112Kb downloaded
Storing download in cache at /home/clayton/.pip_download_cache/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fp%2Fpython-ldap%2Fpython-ldap-2.3.12.tar.gz
Running setup.py egg_info for package python-ldap
extra_compile_args:
extra_objects:
include_dirs: /usr/local/openldap-2.3/include /usr/include/sasl
library_dirs: /usr/local/openldap-2.3/lib
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
warning: no files found matching 'Makefile'
warning: no files found matching 'Modules/LICENSE'
Requirement already satisfied (use --upgrade to upgrade): distribute in /usr/home/clayton/.virtualenvs/ldap/lib/python2.4/site-packages/distribute-0.6.14-py2.4.egg (from python-ldap)
Installing collected packages: python-ldap
Running setup.py install for python-ldap
extra_compile_args:
extra_objects:
include_dirs: /usr/local/openldap-2.3/include /usr/include/sasl
library_dirs: /usr/local/openldap-2.3/lib
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
cc -fno-strict-aliasing -DNDEBUG -O2 -pipe -D__wchar_t=wchar_t -DTHREAD_STACK_SIZE=0x200000 -fno-strict-aliasing -fPIC -DHAVE_LIBLDAP_R -DHAVE_SASL -DHAVE_TLS -DLDAPMODULE_VERSION=2.3.12 -IModules -I/usr/local/openldap-2.3/include -I/usr/include/sasl -I/usr/local/include/python2.4 -c Modules/LDAPObject.c -o build/temp.freebsd-8.1-RELEASE-i386-2.4/Modules/LDAPObject.o
In file included from Modules/LDAPObject.c:9:
Modules/errors.h:8:18: error: lber.h: No such file or directory
Modules/errors.h:9:18: error: ldap.h: No such file or directory
In file included from Modules/LDAPObject.c:9:
Modules/errors.h:12: error: expected ')' before '*' token
In file included from Modules/LDAPObject.c:11:
Modules/LDAPObject.h:12:2: error: #error Current python-ldap requires OpenLDAP 2.x
In file included from Modules/LDAPObject.c:11:
Modules/LDAPObject.h:23: error: expected specifier-qualifier-list before 'LDAP'
Modules/LDAPObject.h:31: error: expected ')' before '*' token
In file included from Modules/LDAPObject.c:12:
Modules/ldapcontrol.h:11: error: expected ')' before '*' token
Modules/ldapcontrol.h:12: error: expected declaration specifiers or '...' before 'LDAPControl'
Modules/ldapcontrol.h:13: error: expected ')' before '*' token
In file included from Modules/LDAPObject.c:13:
Modules/message.h:11: error: expected ')' before '*' token
In file included from Modules/LDAPObject.c:14:
Modules/berval.h:10: warning: 'struct berval' declared inside parameter list
Modules/berval.h:10: warning: its scope is only this definition or declaration, which is probably not what you want
Modules/berval.h:12: warning: 'struct berval' declared inside parameter list
Modules/berval.h:13: warning: 'struct berval' declared inside parameter list
Modules/LDAPObject.c:18:18: error: sasl.h: No such file or directory
Modules/LDAPObject.c:26: error: expected ')' before '*' token
Modules/LDAPObject.c: In function 'dealloc':
Modules/LDAPObject.c:42: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:43: error: 'LDAPObject' has no member named 'valid'
Modules/LDAPObject.c:44: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:44: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:45: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:46: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:46: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:47: error: 'LDAPObject' has no member named 'valid'
Modules/LDAPObject.c:49: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c: In function 'not_valid':
Modules/LDAPObject.c:65: error: 'LDAPObject' has no member named 'valid'
Modules/LDAPObject.c: At top level:
Modules/LDAPObject.c:76: error: expected ')' before '*' token
Modules/LDAPObject.c:103: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
Modules/LDAPObject.c:194: error: expected ')' before '*' token
Modules/LDAPObject.c:206: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
Modules/LDAPObject.c: In function 'l_ldap_unbind_ext':
Modules/LDAPObject.c:332: error: 'LDAPControl' undeclared (first use in this function)
Modules/LDAPObject.c:332: error: (Each undeclared identifier is reported only once
Modules/LDAPObject.c:332: error: for each function it appears in.)
Modules/LDAPObject.c:332: error: 'server_ldcs' undeclared (first use in this function)
Modules/LDAPObject.c:333: error: 'client_ldcs' undeclared (first use in this function)
Modules/LDAPObject.c:341: error: too many arguments to function 'LDAPControls_from_object'
Modules/LDAPObject.c:346: error: too many arguments to function 'LDAPControls_from_object'
Modules/LDAPObject.c:350: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:350: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:351: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:352: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:352: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:357: error: 'LDAP_SUCCESS' undeclared (first use in this function)
Modules/LDAPObject.c:358: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:358: warning: return makes pointer from integer without a cast
Modules/LDAPObject.c:360: error: 'LDAPObject' has no member named 'valid'
Modules/LDAPObject.c: In function 'l_ldap_abandon_ext':
Modules/LDAPObject.c:373: error: 'LDAPControl' undeclared (first use in this function)
Modules/LDAPObject.c:373: error: 'server_ldcs' undeclared (first use in this function)
Modules/LDAPObject.c:374: error: 'client_ldcs' undeclared (first use in this function)
Modules/LDAPObject.c:382: error: too many arguments to function 'LDAPControls_from_object'
Modules/LDAPObject.c:387: error: too many arguments to function 'LDAPControls_from_object'
Modules/LDAPObject.c:391: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:391: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:392: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:393: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:393: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:398: error: 'LDAP_SUCCESS' undeclared (first use in this function)
Modules/LDAPObject.c:399: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:399: warning: return makes pointer from integer without a cast
Modules/LDAPObject.c: In function 'l_ldap_add_ext':
Modules/LDAPObject.c:414: error: 'LDAPControl' undeclared (first use in this function)
Modules/LDAPObject.c:414: error: 'server_ldcs' undeclared (first use in this function)
Modules/LDAPObject.c:415: error: 'client_ldcs' undeclared (first use in this function)
Modules/LDAPObject.c:419: error: 'LDAPMod' undeclared (first use in this function)
Modules/LDAPObject.c:419: error: 'mods' undeclared (first use in this function)
Modules/LDAPObject.c:429: error: too many arguments to function 'LDAPControls_from_object'
Modules/LDAPObject.c:434: error: too many arguments to function 'LDAPControls_from_object'
Modules/LDAPObject.c:438: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:438: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:439: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:440: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:440: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:445: error: 'LDAP_SUCCESS' undeclared (first use in this function)
Modules/LDAPObject.c:446: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:446: warning: return makes pointer from integer without a cast
Modules/LDAPObject.c: In function 'l_ldap_simple_bind':
Modules/LDAPObject.c:462: error: 'LDAPControl' undeclared (first use in this function)
Modules/LDAPObject.c:462: error: 'server_ldcs' undeclared (first use in this function)
Modules/LDAPObject.c:463: error: 'client_ldcs' undeclared (first use in this function)
Modules/LDAPObject.c:464: error: storage size of 'cred' isn't known
Modules/LDAPObject.c:467: error: 'ber_len_t' undeclared (first use in this function)
Modules/LDAPObject.c:467: error: expected ';' before 'cred_len'
Modules/LDAPObject.c:472: error: too many arguments to function 'LDAPControls_from_object'
Modules/LDAPObject.c:477: error: too many arguments to function 'LDAPControls_from_object'
Modules/LDAPObject.c:481: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:481: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:482: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:482: error: 'LDAP_SASL_SIMPLE' undeclared (first use in this function)
Modules/LDAPObject.c:483: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:483: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:488: error: 'LDAP_SUCCESS' undeclared (first use in this function)
Modules/LDAPObject.c:489: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:489: warning: return makes pointer from integer without a cast
Modules/LDAPObject.c: At top level:
Modules/LDAPObject.c:553: error: expected declaration specifiers or '...' before 'sasl_interact_t'
Modules/LDAPObject.c: In function 'interaction':
Modules/LDAPObject.c:562: error: 'interact' undeclared (first use in this function)
Modules/LDAPObject.c:569: error: 'LDAP_OPERATIONS_ERROR' undeclared (first use in this function)
Modules/LDAPObject.c:589: error: 'LDAP_SUCCESS' undeclared (first use in this function)
Modules/LDAPObject.c: At top level:
Modules/LDAPObject.c:601: error: expected ')' before '*' token
Modules/LDAPObject.c: In function 'l_ldap_sasl_interactive_bind_s':
Modules/LDAPObject.c:627: error: 'LDAPControl' undeclared (first use in this function)
Modules/LDAPObject.c:627: error: 'server_ldcs' undeclared (first use in this function)
Modules/LDAPObject.c:628: error: 'client_ldcs' undeclared (first use in this function)
Modules/LDAPObject.c:634: error: 'LDAP_SASL_QUIET' undeclared (first use in this function)
Modules/LDAPObject.c:653: error: too many arguments to function 'LDAPControls_from_object'
Modules/LDAPObject.c:658: error: too many arguments to function 'LDAPControls_from_object'
Modules/LDAPObject.c:674: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:677: error: expected expression before ')' token
Modules/LDAPObject.c:686: error: 'LDAP_SUCCESS' undeclared (first use in this function)
Modules/LDAPObject.c:687: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:687: warning: return makes pointer from integer without a cast
Modules/LDAPObject.c: In function 'l_ldap_compare_ext':
Modules/LDAPObject.c:745: error: 'LDAPControl' undeclared (first use in this function)
Modules/LDAPObject.c:745: error: 'server_ldcs' undeclared (first use in this function)
Modules/LDAPObject.c:746: error: 'client_ldcs' undeclared (first use in this function)
Modules/LDAPObject.c:751: error: storage size of 'value' isn't known
Modules/LDAPObject.c:754: error: 'ber_len_t' undeclared (first use in this function)
Modules/LDAPObject.c:754: error: expected ';' before 'value_len'
Modules/LDAPObject.c:759: error: too many arguments to function 'LDAPControls_from_object'
Modules/LDAPObject.c:764: error: too many arguments to function 'LDAPControls_from_object'
Modules/LDAPObject.c:768: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:768: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:769: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:770: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:770: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:775: error: 'LDAP_SUCCESS' undeclared (first use in this function)
Modules/LDAPObject.c:776: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:776: warning: return makes pointer from integer without a cast
Modules/LDAPObject.c: In function 'l_ldap_delete_ext':
Modules/LDAPObject.c:790: error: 'LDAPControl' undeclared (first use in this function)
Modules/LDAPObject.c:790: error: 'server_ldcs' undeclared (first use in this function)
Modules/LDAPObject.c:791: error: 'client_ldcs' undeclared (first use in this function)
Modules/LDAPObject.c:800: error: too many arguments to function 'LDAPControls_from_object'
Modules/LDAPObject.c:805: error: too many arguments to function 'LDAPControls_from_object'
Modules/LDAPObject.c:809: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:809: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:810: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:811: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:811: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:816: error: 'LDAP_SUCCESS' undeclared (first use in this function)
Modules/LDAPObject.c:817: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:817: warning: return makes pointer from integer without a cast
Modules/LDAPObject.c: In function 'l_ldap_modify_ext':
Modules/LDAPObject.c:832: error: 'LDAPControl' undeclared (first use in this function)
Modules/LDAPObject.c:832: error: 'server_ldcs' undeclared (first use in this function)
Modules/LDAPObject.c:833: error: 'client_ldcs' undeclared (first use in this function)
Modules/LDAPObject.c:837: error: 'LDAPMod' undeclared (first use in this function)
Modules/LDAPObject.c:837: error: 'mods' undeclared (first use in this function)
Modules/LDAPObject.c:847: error: too many arguments to function 'LDAPControls_from_object'
Modules/LDAPObject.c:852: error: too many arguments to function 'LDAPControls_from_object'
Modules/LDAPObject.c:856: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:856: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:857: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:858: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:858: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:864: error: 'LDAP_SUCCESS' undeclared (first use in this function)
Modules/LDAPObject.c:865: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:865: warning: return makes pointer from integer without a cast
Modules/LDAPObject.c: In function 'l_ldap_rename':
Modules/LDAPObject.c:881: error: 'LDAPControl' undeclared (first use in this function)
Modules/LDAPObject.c:881: error: 'server_ldcs' undeclared (first use in this function)
Modules/LDAPObject.c:882: error: 'client_ldcs' undeclared (first use in this function)
Modules/LDAPObject.c:892: error: too many arguments to function 'LDAPControls_from_object'
Modules/LDAPObject.c:897: error: too many arguments to function 'LDAPControls_from_object'
Modules/LDAPObject.c:901: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:901: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:902: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:903: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:903: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:908: error: 'LDAP_SUCCESS' undeclared (first use in this function)
Modules/LDAPObject.c:909: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:909: warning: return makes pointer from integer without a cast
Modules/LDAPObject.c: In function 'l_ldap_result3':
Modules/LDAPObject.c:920: error: 'LDAP_RES_ANY' undeclared (first use in this function)
Modules/LDAPObject.c:926: error: 'LDAPMessage' undeclared (first use in this function)
Modules/LDAPObject.c:926: error: 'msg' undeclared (first use in this function)
Modules/LDAPObject.c:941: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:941: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:942: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:943: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:943: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:946: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:946: warning: return makes pointer from integer without a cast
Modules/LDAPObject.c:953: error: 'LDAP_TIMEOUT' undeclared (first use in this function)
Modules/LDAPObject.c:961: error: 'LDAPControl' undeclared (first use in this function)
Modules/LDAPObject.c:961: error: 'serverctrls' undeclared (first use in this function)
Modules/LDAPObject.c:962: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:962: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:963: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:965: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:965: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:967: error: 'LDAP_SUCCESS' undeclared (first use in this function)
Modules/LDAPObject.c:969: error: 'LDAP_REFERRAL' undeclared (first use in this function)
Modules/LDAPObject.c:975: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:975: warning: return makes pointer from integer without a cast
Modules/LDAPObject.c:978: warning: assignment makes pointer from integer without a cast
Modules/LDAPObject.c:979: error: 'LDAP_NO_MEMORY' undeclared (first use in this function)
Modules/LDAPObject.c:980: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:980: error: 'LDAP_OPT_ERROR_NUMBER' undeclared (first use in this function)
Modules/LDAPObject.c:982: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:982: warning: return makes pointer from integer without a cast
Modules/LDAPObject.c:986: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:986: warning: assignment makes pointer from integer without a cast
Modules/LDAPObject.c: In function 'l_ldap_search_ext':
Modules/LDAPObject.c:1027: error: 'LDAPControl' undeclared (first use in this function)
Modules/LDAPObject.c:1027: error: 'server_ldcs' undeclared (first use in this function)
Modules/LDAPObject.c:1028: error: 'client_ldcs' undeclared (first use in this function)
Modules/LDAPObject.c:1055: error: too many arguments to function 'LDAPControls_from_object'
Modules/LDAPObject.c:1060: error: too many arguments to function 'LDAPControls_from_object'
Modules/LDAPObject.c:1064: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:1064: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:1065: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:1067: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:1067: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:1073: error: 'LDAP_SUCCESS' undeclared (first use in this function)
Modules/LDAPObject.c:1074: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:1074: warning: return makes pointer from integer without a cast
Modules/LDAPObject.c: In function 'l_ldap_whoami_s':
Modules/LDAPObject.c:1087: error: 'LDAPControl' undeclared (first use in this function)
Modules/LDAPObject.c:1087: error: 'server_ldcs' undeclared (first use in this function)
Modules/LDAPObject.c:1088: error: 'client_ldcs' undeclared (first use in this function)
Modules/LDAPObject.c:1099: error: too many arguments to function 'LDAPControls_from_object'
Modules/LDAPObject.c:1104: error: too many arguments to function 'LDAPControls_from_object'
Modules/LDAPObject.c:1108: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:1108: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:1109: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:1110: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:1110: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:1115: error: 'LDAP_SUCCESS' undeclared (first use in this function)
Modules/LDAPObject.c:1116: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:1116: warning: return makes pointer from integer without a cast
Modules/LDAPObject.c:1118: warning: passing argument 1 of 'LDAPberval_to_object' from incompatible pointer type
Modules/LDAPObject.c: In function 'l_ldap_start_tls_s':
Modules/LDAPObject.c:1134: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:1135: error: 'LDAP_SUCCESS' undeclared (first use in this function)
Modules/LDAPObject.c:1136: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:1136: error: 'LDAP_OPT_ERROR_NUMBER' undeclared (first use in this function)
Modules/LDAPObject.c:1137: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:1137: warning: return makes pointer from integer without a cast
Modules/LDAPObject.c: In function 'l_ldap_passwd':
Modules/LDAPObject.c:1181: error: storage size of 'user' isn't known
Modules/LDAPObject.c:1183: error: storage size of 'oldpw' isn't known
Modules/LDAPObject.c:1185: error: storage size of 'newpw' isn't known
Modules/LDAPObject.c:1189: error: 'LDAPControl' undeclared (first use in this function)
Modules/LDAPObject.c:1189: error: 'server_ldcs' undeclared (first use in this function)
Modules/LDAPObject.c:1190: error: 'client_ldcs' undeclared (first use in this function)
Modules/LDAPObject.c:1198: error: 'ber_len_t' undeclared (first use in this function)
Modules/LDAPObject.c:1198: error: expected ';' before 'user_len'
Modules/LDAPObject.c:1199: error: expected ';' before 'oldpw_len'
Modules/LDAPObject.c:1200: error: expected ';' before 'newpw_len'
Modules/LDAPObject.c:1205: error: too many arguments to function 'LDAPControls_from_object'
Modules/LDAPObject.c:1210: error: too many arguments to function 'LDAPControls_from_object'
Modules/LDAPObject.c:1214: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:1214: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:1215: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:1222: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:1222: error: 'LDAPObject' has no member named '_save'
Modules/LDAPObject.c:1227: error: 'LDAP_SUCCESS' undeclared (first use in this function)
Modules/LDAPObject.c:1228: error: 'LDAPObject' has no member named 'ldap'
Modules/LDAPObject.c:1228: warning: return makes pointer from integer without a cast
error: command 'cc' failed with exit status 1
The most import lines to take note of here are the following:
include_dirs: /usr/local/openldap-2.3/include /usr/include/sasl
library_dirs: /usr/local/openldap-2.3/lib
Modules/errors.h:8:18: error: lber.h: No such file or directory
Modules/errors.h:9:18: error: ldap.h: No such file or directory
Modules/LDAPObject.c:18:18: error: sasl.h: No such file or directory
This means that when pip was trying to install python-ldap, it could not find the dev headers necessary to build the C extensions. Most of the time, this just means that you need to install the appropriate library-dev
package, but in this case, I already have the headers available in /usr/local/include
.
The solution in this case is to use zc.recipe.egg to install the python-ldap egg for us. This will allow us to define extra paths to look in for the header files.
[buildout] parts = ... python-ldap [python-ldap] recipe = zc.recipe.egg:custom egg = python-ldap include-dirs = /opt/local/include /opt/local/include/sasl /usr/local/include /usr/local/include/sasl /usr/include /usr/include/sasl library-dirs = /opt/local/lib /opt/local/lib/sasl2 /usr/local/lib /usr/local/lib/sasl2 /usr/lib /usr/lib/sasl2 rpath = ${:library-dirs}
Now you can use this egg by referencing the python-ldap part as follows:
[instance] ... eggs = ... ${python-ldap:egg}
This allows you to rely on your package manager to keep the LDAP libraries up to date.
Questions? Comments? Feel free to provide your feedback below. We will make sure to respond to you.
Thanks for filling out the form! A Six Feet Up representative will be in contact with you soon.