学无先后,达者为师

网站首页 编程语言 正文

关于启动报错ModuleNotFoundError:No module named ‘python-ldap‘

作者:邹先生聊数智斌能 更新时间: 2023-07-07 编程语言

安装:

pip install python-ldap==3.4.0

安装报错:

/usr/lib/python3/dist-packages/secretstorage/dhcrypto.py:15: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
/usr/lib/python3/dist-packages/secretstorage/util.py:19: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
Collecting python-ldap==3.4.0
  Downloading python-ldap-3.4.0.tar.gz (376 kB)
     |████████████████████████████████| 376 kB 17 kB/s 
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: pyasn1-modules>=0.1.5 in /usr/lib/python3/dist-packages (from python-ldap==3.4.0) (0.2.1)
Requirement already satisfied: pyasn1>=0.3.7 in /usr/lib/python3/dist-packages (from python-ldap==3.4.0) (0.4.2)
Building wheels for collected packages: python-ldap
  Building wheel for python-ldap (PEP 517) ... error

ERROR: Failed building wheel for python-ldap

解决方法:

sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev

pip install python-ldap==3.4.0

原文链接:https://blog.csdn.net/weixin_38708145/article/details/131488160

  • 上一篇:没有了
  • 下一篇:没有了
栏目分类
最近更新