如何解决安装python-ldap和django-auth-ldap在Windows上使用pip时出现的错误?

2026-05-21 19:133阅读0评论SEO资源
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计340个文字,预计阅读时间需要2分钟。

如何解决安装python-ldap和django-auth-ldap在Windows上使用pip时出现的错误?

安装`pip`时遇到问题:`is not a supported wheel on this platform`。原因1:安装的库不是对应Python版本的库,例如下载的库中包含`cp27`表示适用于Python 2.7。原因2:遇到的具体情况(下)。


pip install

安装出现问题: is not a supported wheel on this platform


可能的原因1:安装的不是对应python版本的库,下载的库名中cp27代表python2.7,其它同理。

可能的原因2:这个是我遇到的情况(下载的是对应版本的库,然后仍然提示不支持当前平台)


解决方法:

1、 在win + R ,输入cmd ,在shell中输入

如何解决安装python-ldap和django-auth-ldap在Windows上使用pip时出现的错误?

# win32
python
import pip
print(pip.pep425tags.get_supported())


# AMD64
python
import pip._internal
print(pip._internal.pep425tags.get_supported())

可以获取到pip支持的文件名还有版本:

>>import pip; print(pip.pep425tags.get_supported())
[('cp35', 'none', 'any'), ('cp34', 'none', 'any'), ('cp33', 'none', 'any'), ('cp32', 'none', 'any'), ('cp31', 'none', 'any'), ('cp30', 'none', 'any'), ('py3', 'none', 'win_amd64'), ('py36', 'none', 'any'), ('py3', 'none', 'any'), ('py35', 'none', 'any'), ('py34', 'none', 'any'), ('py33', 'none', 'any'), ('py32', 'none', 'any'), ('py31', 'none', 'any'), ('py30', 'none', 'any')]

此时将python_ldap-3.2.0-cp35-cp35m-win_amd64.whl 改为python_ldap-3.2.0-cp35-none-win_amd64.whl

再次执行

pip install


本文共计340个文字,预计阅读时间需要2分钟。

如何解决安装python-ldap和django-auth-ldap在Windows上使用pip时出现的错误?

安装`pip`时遇到问题:`is not a supported wheel on this platform`。原因1:安装的库不是对应Python版本的库,例如下载的库中包含`cp27`表示适用于Python 2.7。原因2:遇到的具体情况(下)。


pip install

安装出现问题: is not a supported wheel on this platform


可能的原因1:安装的不是对应python版本的库,下载的库名中cp27代表python2.7,其它同理。

可能的原因2:这个是我遇到的情况(下载的是对应版本的库,然后仍然提示不支持当前平台)


解决方法:

1、 在win + R ,输入cmd ,在shell中输入

如何解决安装python-ldap和django-auth-ldap在Windows上使用pip时出现的错误?

# win32
python
import pip
print(pip.pep425tags.get_supported())


# AMD64
python
import pip._internal
print(pip._internal.pep425tags.get_supported())

可以获取到pip支持的文件名还有版本:

>>import pip; print(pip.pep425tags.get_supported())
[('cp35', 'none', 'any'), ('cp34', 'none', 'any'), ('cp33', 'none', 'any'), ('cp32', 'none', 'any'), ('cp31', 'none', 'any'), ('cp30', 'none', 'any'), ('py3', 'none', 'win_amd64'), ('py36', 'none', 'any'), ('py3', 'none', 'any'), ('py35', 'none', 'any'), ('py34', 'none', 'any'), ('py33', 'none', 'any'), ('py32', 'none', 'any'), ('py31', 'none', 'any'), ('py30', 'none', 'any')]

此时将python_ldap-3.2.0-cp35-cp35m-win_amd64.whl 改为python_ldap-3.2.0-cp35-none-win_amd64.whl

再次执行

pip install