1.问题描述
笔者用pip命令安装一个工具包时,报错:
E:\anaconda3\Scripts>pip install VTK-8.2.0-cp38-cp38-win32.whl
ERROR: VTK-8.2.0-cp38-cp38-win32.whl is not a supported wheel on this platform.
错误提示是:VTK-8.2.0-cp38-cp38-win32.whl 在此平台上不受支持。
2.解决办法
两个解决办法,具体看用哪一个。
第一种,解决办法:更新pip工具包:
python -m pip install --upgrade pip
第二种,使用如下命令查看,当前平台支持的版本
pip debug --verbose
提示如下:
E:\anaconda3\Scripts>pip debug --verbose
WARNING: This command is only meant for debugging. Do not use this with automation for parsing and getting these details, since the output and options of this command may change without notice.
pip version: pip 20.2.4 from E:\anaconda3\lib\site-packages\pip (python 3.8)
sys.version: 3.8.5 (default, Sep 3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)]
sys.executable: E:\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(): E:\anaconda3\lib\site-packages\pip\_vendor\certifi\cacert.pem
pip._vendor.DEBUNDLED: False
vendored library versions:
appdirs==1.4.4
CacheControl==0.12.6
colorama==0.4.3
contextlib2==0.6.0.post1 (Unable to locate actual module version, using vendor.txt specified version)
distlib==0.3.1
distro==1.5.0 (Unable to locate actual module version, using vendor.txt specified version)
html5lib==1.1
ipaddress==1.0.23
msgpack==1.0.0 (Unable to locate actual module version, using vendor.txt specified version)
packaging==20.4
pep517==0.8.2
progress==1.5
pyparsing==2.4.7
requests==2.24.0
certifi==2020.06.20
chardet==3.0.4
idna==2.10
urllib3==1.25.9
resolvelib==0.4.0
retrying==1.3.3 (Unable to locate actual module version, using vendor.txt specified version)
setuptools==44.0.0 (Unable to locate actual module version, using vendor.txt specified version)
six==1.15.0
toml==0.10.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
从中我们可以看到Compatible tags字样,这些就是当前Python版本可以适配的标签。例如,我的Python版本是3.8,可以匹配下面这些文件名:
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
此时,从vtk官网下载 VTK-8.2.0-cp38-cp38-win_amd64.whl,进行安装
pip install VTK-8.2.0-cp38-cp38-win_amd64.whl
问题解决
E:\anaconda3\Scripts>pip install VTK-8.2.0-cp38-cp38-win_amd64.whl
Processing e:\anaconda3\scripts\vtk-8.2.0-cp38-cp38-win_amd64.whl
Installing collected packages: VTK
Successfully installed VTK-8.2.0
参考:
1.【2021新教程】解决is not a supported wheel on this platform-解决pip has no attribute pep425tags-解决网上旧教程不适用的问题
2.python3.4 .whl is not a supported wheel on this platform.解决办法