Dockfile编译镜像安装requirements.txt依赖模块的时候,安装python-ldap模块报错,查看了https://www.python-ldap.org/en/python-ldap-3.4.2/installing.html#debian发现是缺少了几个系统依赖,使用的镜像是:python:3.8.13-slim
报错:

  × Building wheel for python-ldap (pyproject.toml) did not run successfully.     

解决方案:

 apt-get -y  install build-essential python3-dev  libldap2-dev libsasl2-dev  ldap-utils tox lcov valgrind
Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐