报错is not a supported wheel on this platform

原因:未使用正确版本的wheel。

要下载正确的wheel,首先要知道自己系统python的版本。

查看自己系统Python版本的方法,网上有很多教程,我试了几个都失败了,

比如:

import pip
print(pip.pep425tags.get_supported())

import pip._internal
print(pip._internal.pep425tags.get_supported())

后来找到一个成功的方法

python -m pip debug --verbose

结果如下

pip version: pip 22.1.2 from C:\Users\50371\anaconda3\envs\pytorch_env\lib\site-packages\pip (python 3.9)
sys.version: 3.9.12 (main, Apr  4 2022, 05:22:27) [MSC v.1916 64 bit (AMD64)]
sys.executable: C:\Users\50371\anaconda3\envs\pytorch_env\python.exe
sys.getdefaultencoding: utf-8
sys.getfilesystemencoding: utf-8
locale.getpreferredencoding: cp936
sys.platform: win32
sys.implementation:
  name: cpython
'cert' config value: Not specified
REQUESTS_CA_BUNDLE: None
CURL_CA_BUNDLE: None
pip._vendor.certifi.where(): C:\Users\50371\anaconda3\envs\pytorch_env\lib\site-packages\pip\_vendor\certifi\cacert.pem
pip._vendor.DEBUNDLED: False
vendored library versions:
  CacheControl==0.12.11
  colorama==0.4.4
  distlib==0.3.3
  distro==1.7.0
  html5lib==1.1
  msgpack==1.0.3 (Unable to locate actual module version, using vendor.txt specified version)
  packaging==21.3
  pep517==0.12.0
  platformdirs==2.5.2
  pyparsing==3.0.8
  requests==2.27.1
  certifi==2021.10.08
  chardet==4.0.0
  idna==3.3
  urllib3==1.26.9
  rich==12.2.0 (Unable to locate actual module version, using vendor.txt specified version)
  pygments==2.11.2
  typing_extensions==4.2.0 (Unable to locate actual module version, using vendor.txt specified version)
  resolvelib==0.8.1
  setuptools==44.0.0 (Unable to locate actual module version, using vendor.txt specified version)
  six==1.16.0
  tenacity==8.0.1 (Unable to locate actual module version, using vendor.txt specified version)
  tomli==2.0.1
  webencodings==0.5.1 (Unable to locate actual module version, using vendor.txt specified version)
Compatible tags: 33
  cp39-cp39-win_amd64
  cp39-abi3-win_amd64
  cp39-none-win_amd64
  cp38-abi3-win_amd64
  cp37-abi3-win_amd64
  cp36-abi3-win_amd64
  cp35-abi3-win_amd64
  cp34-abi3-win_amd64
  cp33-abi3-win_amd64
  cp32-abi3-win_amd64
  py39-none-win_amd64
  py3-none-win_amd64
  py38-none-win_amd64
  py37-none-win_amd64
  py36-none-win_amd64
  py35-none-win_amd64
  py34-none-win_amd64
  py33-none-win_amd64
  py32-none-win_amd64
  py31-none-win_amd64
  py30-none-win_amd64
  cp39-none-any
  py39-none-any
  py3-none-any
  py38-none-any
  py37-none-any
  py36-none-any
  py35-none-any
  py34-none-any
  py33-none-any
  py32-none-any
  py31-none-any
  py30-none-any

可见最高版本是cp39

但奇怪的是我又在base环境试了下,

结果却不一样

pip version: pip 22.1.2 from C:\Users\50371\anaconda3\lib\site-packages\pip (python 3.8)
sys.version: 3.8.8 (default, Apr 13 2021, 15:08:03) [MSC v.1916 64 bit (AMD64)]
sys.executable: C:\Users\50371\anaconda3\python.exe
sys.getdefaultencoding: utf-8
sys.getfilesystemencoding: utf-8
locale.getpreferredencoding: cp936
sys.platform: win32
sys.implementation:
  name: cpython
'cert' config value: Not specified
REQUESTS_CA_BUNDLE: None
CURL_CA_BUNDLE: None
pip._vendor.certifi.where(): C:\Users\50371\anaconda3\lib\site-packages\pip\_vendor\certifi\cacert.pem
pip._vendor.DEBUNDLED: False
vendored library versions:
  CacheControl==0.12.11
  colorama==0.4.4
  distlib==0.3.3
  distro==1.7.0
  html5lib==1.1
  msgpack==1.0.3 (Unable to locate actual module version, using vendor.txt specified version)
  packaging==21.3
  pep517==0.12.0
  platformdirs==2.5.2
  pyparsing==3.0.8
  requests==2.27.1
  certifi==2021.10.08
  chardet==4.0.0
  idna==3.3
  urllib3==1.26.9
  rich==12.2.0 (Unable to locate actual module version, using vendor.txt specified version)
  pygments==2.11.2
  typing_extensions==4.2.0 (Unable to locate actual module version, using vendor.txt specified version)
  resolvelib==0.8.1
  setuptools==44.0.0 (Unable to locate actual module version, using vendor.txt specified version)
  six==1.16.0
  tenacity==8.0.1 (Unable to locate actual module version, using vendor.txt specified version)
  tomli==2.0.1
  webencodings==0.5.1 (Unable to locate actual module version, using vendor.txt specified version)
Compatible tags: 30
  cp38-cp38-win_amd64
  cp38-abi3-win_amd64
  cp38-none-win_amd64
  cp37-abi3-win_amd64
  cp36-abi3-win_amd64
  cp35-abi3-win_amd64
  cp34-abi3-win_amd64
  cp33-abi3-win_amd64
  cp32-abi3-win_amd64
  py38-none-win_amd64
  py3-none-win_amd64
  py37-none-win_amd64
  py36-none-win_amd64
  py35-none-win_amd64
  py34-none-win_amd64
  py33-none-win_amd64
  py32-none-win_amd64
  py31-none-win_amd64
  py30-none-win_amd64
  cp38-none-any
  py38-none-any
  py3-none-any
  py37-none-any
  py36-none-any
  py35-none-any
  py34-none-any
  py33-none-any
  py32-none-any
  py31-none-any
  py30-none-any

最高版本是cp3.8。

可是我电脑上明明只安装了python3.9啊.......

迷惑.....

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
"is not a supported wheel on this platform"是一个常见的pip安装报错信息,表示在当前平台上不支持该安装包。这个错误信息通常出现在尝试使用pip安装一个.whl文件(Python包的二进制分发)时。有几个可能的原因导致这个问题出现。 首先,可能是因为你正在尝试在不兼容的操作系统或Python版本上安装该包。某些包可能只支持特定的操作系统或Python版本,因此你需要确保你的操作系统和Python版本与包的要求相匹配。 其次,可能是因为你下载的.whl文件与你的操作系统或Python版本不兼容。你需要确保下载的.whl文件是适用于你的操作系统和Python版本的。 另外,可能是因为你的pip版本过旧。你可以尝试升级pip到最新版本,使用以下命令:pip install --upgrade pip 最后,可能是因为你正在使用的Python环境没有正确配置。你可以使用命令pip --version来确认你正在使用的pip是与你所期望的Python版本相关联的。如果不是,你可以尝试使用pip3代替pip来确保与你所需的Python版本相关联。 综上所述,解决"is not a supported wheel on this platform"报错的方法包括: 1. 确保你的操作系统和Python版本与安装包的要求相匹配。 2. 确保下载的.whl文件与你的操作系统和Python版本兼容。 3. 升级pip到最新版本。 4. 确认你正在使用的pip与你所需的Python版本相关联。 请根据你的具体情况尝试以上方法来解决该报错。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [(2021年)is not a supported wheel on this platform解决方案](https://blog.csdn.net/qq_40734247/article/details/119391890)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *2* [Python使用pip安装报错:is not a supported wheel on this platform的解决方法](https://download.csdn.net/download/weixin_38637918/12870748)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值