最近工作中安排了一个Python web项目,使用Pycharm从git拉取代码后,配置号Python的解释器和pip后,Pycharm自动下载安装项目所需的依赖,但是有一个依赖django-auth-ldap==4.1.0安装始终失败,最初的异常信息提示是:Microsoft Visual C++ 14.0 or greater is required,Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
直接根据提示去微软官网下载相关c++构建工具
,然后使用这个工具去安装c++桌面开发工具(只选择C++桌面开发就行了),默认选中的组件安装就可以了,安装好了,再次在终端执行pip install django-auth-ldap==4.1.0 仍然还是会报错,
3.5.2->Django>=2.2->django-auth-ldap==4.1.0) (4.11.0)
Building wheels for collected packages: python-ldap
Building wheel for python-ldap (PEP 517): started
Building wheel for python-ldap (PEP 517): finished with status 'error'
Failed to build python-ldap
根据提示语:是构建python-ldap的时候失败了,说明安装 django-auth-ldap是依赖python-ldap的,所以单独执行 pip

最低0.47元/天 解锁文章
1万+

被折叠的 条评论
为什么被折叠?



