Elo*_*ask 7 python python-ldap python-venv odoo pyproject.toml
我在 Ubuntu 20.04 上的 Python 虚拟环境中安装 Odoo 15。我已经从官方 GitHub 存储库下载了 Odoo,并使用 Nginx 作为反向代理。
\n按照文档在 ubuntu 22.04 中安装和设置 odoo 后,我确实遵循了此链接中的操作文档
\n当我使用命令安装 pip 软件包时,我收到此错误\n pip install -r requirement.txt
\nany help please。
Building wheels for collected packages: python-ldap\n Building wheel for python-ldap (pyproject.toml) ... error\n error: subprocess-exited-with-error\n \n \xc3\x97 Building wheel for python-ldap (pyproject.toml) did not run successfully.\n \xe2\x94\x82 exit code: 1\n \xe2\x95\xb0\xe2\x94\x80> [111 lines of output]\n /tmp/pip-build-env-rbfhnio_/overlay/lib/python3.10/site-packages/setuptools/config/setupcfg.py:516: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.\n warnings.warn(msg, warning_class)\n running bdist_wheel\n running build\n running build_py\n creating build\n creating build/lib.linux-x86_64-cpython-310\n copying Lib/ldapurl.py -> build/lib.linux-x86_64-cpython-310\n copying Lib/ldif.py -> build/lib.linux-x86_64-cpython-310\n creating build/lib.linux-x86_64-cpython-310/ldap\n copying Lib/ldap/resiter.py -> build/lib.linux-x86_64-cpython-310/ldap\n copying Lib/ldap/syncrepl.py -> build/lib.linux-x86_64-cpython-310/ldap\n copying Lib/ldap/__init__.py -> build/lib.linux-x86_64-cpython-310/ldap\n copying Lib/ldap/dn.py -> build/lib.linux-x86_64-cpython-310/ldap\n copying Lib/ldap/async.py -> build/lib.linux-x86_64-cpython-310/ldap\n copying Lib/ldap/sasl.py -> build/lib.linux-x86_64-cpython-310/ldap\n copying Lib/ldap/asyncsearch.py -> build/lib.linux-x86_64-cpython-310/ldap\n copying Lib/ldap/logger.py -> build/lib.linux-x86_64-cpython-310/ldap\n copying Lib/ldap/functions.py -> build/lib.linux-x86_64-cpython-310/ldap\n copying Lib/ldap/modlist.py -> build/lib.linux-x86_64-cpython-310/ldap\n copying Lib/ldap/constants.py -> build/lib.linux-x86_64-cpython-310/ldap\n copying Lib/ldap/ldapobject.py -> build/lib.linux-x86_64-cpython-310/ldap\n copying Lib/ldap/filter.py -> build/lib.linux-x86_64-cpython-310/ldap\n copying Lib/ldap/pkginfo.py -> build/lib.linux-x86_64-cpython-310/ldap\n copying Lib/ldap/cidict.py -> build/lib.linux-x86_64-cpython-310/ldap\n copying Lib/ldap/compat.py -> build/lib.linux-x86_64-cpython-310/ldap\n creating build/lib.linux-x86_64-cpython-310/ldap/controls\n copying Lib/ldap/controls/psearch.py -> build/lib.linux-x86_64-cpython-310/ldap/controls\n copying Lib/ldap/controls/sessiontrack.py -> build/lib.linux-x86_64-cpython-310/ldap/controls\n copying Lib/ldap/controls/simple.py -> build/lib.linux-x86_64-cpython-310/ldap/controls\n copying Lib/ldap/controls/__init__.py -> build/lib.linux-x86_64-cpython-310/ldap/controls\n copying Lib/ldap/controls/vlv.py -> build/lib.linux-x86_64-cpython-310/ldap/controls\n copying Lib/ldap/controls/sss.py -> build/lib.linux-x86_64-cpython-310/ldap/controls\n copying Lib/ldap/controls/libldap.py -> build/lib.linux-x86_64-cpython-310/ldap/controls\n copying Lib/ldap/controls/pagedresults.py -> build/lib.linux-x86_64-cpython-310/ldap/controls\n copying Lib/ldap/controls/pwdpolicy.py -> build/lib.linux-x86_64-cpython-310/ldap/controls\n copying Lib/ldap/controls/readentry.py -> build/lib.linux-x86_64-cpython-310/ldap/controls\n copying Lib/ldap/controls/deref.py -> build/lib.linux-x86_64-cpython-310/ldap/controls\n copying Lib/ldap/controls/ppolicy.py -> build/lib.linux-x86_64-cpython-310/ldap/controls\n copying Lib/ldap/controls/openldap.py -> build/lib.linux-x86_64-cpython-310/ldap/controls\n creating build/lib.linux-x86_64-cpython-310/ldap/extop\n copying Lib/ldap/extop/passwd.py -> build/lib.linux-x86_64-cpython-310/ldap/extop\n copying Lib/ldap/extop/__init__.py -> build/lib.linux-x86_64-cpython-310/ldap/extop\n copying Lib/ldap/extop/dds.py -> build/lib.linux-x86_64-cpython-310/ldap/extop\n creating build/lib.linux-x86_64-cpython-310/ldap/schema\n copying Lib/ldap/schema/__init__.py -> build/lib.linux-x86_64-cpython-310/ldap/schema\n copying Lib/ldap/schema/subentry.py -> build/lib.linux-x86_64-cpython-310/ldap/schema\n copying Lib/ldap/schema/tokenizer.py -> build/lib.linux-x86_64-cpython-310/ldap/schema\n copying Lib/ldap/schema/models.py -> build/lib.linux-x86_64-cpython-310/ldap/schema\n creating build/lib.linux-x86_64-cpython-310/slapdtest\n copying Lib/slapdtest/__init__.py -> build/lib.linux-x86_64-cpython-310/slapdtest\n copying Lib/slapdtest/_slapdtest.py -> build/lib.linux-x86_64-cpython-310/slapdtest\n running egg_info\n writing Lib/python_ldap.egg-info/PKG-INFO\n writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt\n writing requirements to Lib/python_ldap.egg-info/requires.txt\n writing top-level names to Lib/python_ldap.egg-info/top_level.txt\n reading manifest file \'Lib/python_ldap.egg-info/SOURCES.txt\'\n reading manifest template \'MANIFEST.in\'\n no previously-included directories found matching \'Doc/.build\'\n adding license file \'LICENCE\'\n writing manifest file \'Lib/python_ldap.egg-info/SOURCES.txt\'\n /tmp/pip-build-env-rbfhnio_/overlay/lib/python3.10/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning: Installing \'slapdtest.certs\' as data is deprecated, please list it in `packages`.\n !!\n \n \n ############################\n # Package would be ignored #\n ############################\n Python recognizes \'slapdtest.certs\' as an importable package,\n but it is not listed in the `packages` configuration of setuptools.\n \n \'slapdtest.certs\' has been automatically added to the distribution only\n because it may contain data files, but this behavior is likely to change\n in future versions of setuptools (and therefore is considered deprecated).\n \n Please make sure that \'slapdtest.certs\' is included as a package by using\n the `packages` configuration field or the proper discovery methods\n (for example by using `find_namespace_packages(...)`/`find_namespace:`\n instead of `find_packages(...)`/`find:`).\n \n You can read more about "package discovery" and "data files" on setuptools\n documentation page.\n \n \n !!\n \n check.warn(importable)\n creating build/lib.linux-x86_64-cpython-310/slapdtest/certs\n copying Lib/slapdtest/certs/README -> build/lib.linux-x86_64-cpython-310/slapdtest/certs\n copying Lib/slapdtest/certs/ca.conf -> build/lib.linux-x86_64-cpython-310/slapdtest/certs\n copying Lib/slapdtest/certs/ca.pem -> build/lib.linux-x86_64-cpython-310/slapdtest/certs\n copying Lib/slapdtest/certs/client.conf -> build/lib.linux-x86_64-cpython-310/slapdtest/certs\n copying Lib/slapdtest/certs/client.key -> build/lib.linux-x86_64-cpython-310/slapdtest/certs\n copying Lib/slapdtest/certs/client.pem -> build/lib.linux-x86_64-cpython-310/slapdtest/certs\n copying Lib/slapdtest/certs/gencerts.sh -> build/lib.linux-x86_64-cpython-310/slapdtest/certs\n copying Lib/slapdtest/certs/gennssdb.sh -> build/lib.linux-x86_64-cpython-310/slapdtest/certs\n copying Lib/slapdtest/certs/server.conf -> build/lib.linux-x86_64-cpython-310/slapdtest/certs\n copying Lib/slapdtest/certs/server.key -> build/lib.linux-x86_64-cpython-310/slapdtest/certs\n copying Lib/slapdtest/certs/server.pem -> build/lib.linux-x86_64-cpython-310/slapdtest/certs\n running build_ext\n building \'_ldap\' extension\n creating build/temp.linux-x86_64-cpython-310\n creating build/temp.linux-x86_64-cpython-310/Modules\n x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -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/opt/odoo15/odoo-venv/include -I/usr/include/python3.10 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-cpython-310/Modules/LDAPObject.o\n In file included from Modules/LDAPObject.c:3:\n Modules/common.h:15:10: fatal error: lber.h: No such file or directory\n 15 | #include <lber.h>\n | ^~~~~~~~\n compilation terminated.\n error: command \'/usr/bin/x86_64-linux-gnu-gcc\' failed with exit code 1\n [end of output]\n \n note: This error originates from a subprocess, and is likely not a problem with pip.\n ERROR: Failed building wheel for python-ldap\nFailed to build python-ldap\nERROR: Could not build wheels for python-ldap, which is required to install pyproject.toml-based projects\n
Run Code Online (Sandbox Code Playgroud)\n
Sid*_*nda 11
这个问题是因为你的系统中没有python-dev。还可以使用 python 3.8+。但是要解决您的问题,请在终端中使用以下代码:
sudo apt-get install python3-dev libxml2-dev libxslt1-dev zlib1g-dev libsasl2-dev libldap2-dev build-essential libssl-dev libffi-dev libmysqlclient-dev libjpeg-dev libpq-dev libjpeg8-dev liblcms2-dev libblas-dev libatlas-base-dev
Run Code Online (Sandbox Code Playgroud)