明明是对应平台以及版本的whl文件,为啥还是提示我not a supported wheel??!!!
本地python环境是3.5的
安装:
D:\intall_path\some_whl>pip install python_Levenshtein-0.12.0-cp35-cp35m-win_amd
64.whl
安装失败:
python_Levenshtein-0.12.0-cp35-cp35m-win_amd64.whl is not a supported wheel on t
his platform.
解决办法:
D:\intall_path\some_whl>python
Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:54:25) [MSC v.1900 64 bit (AM
D64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pip
>>> print(pip.pep425tags.get_supported())
[('cp35', 'none', 'win_amd64'), ('py3', 'none', 'win_amd64'), ('cp35', 'none', '
any'), ('cp3', 'none', 'any'), ('cp34', 'none', 'any'), ('cp33', 'none', 'any'),
('cp32', 'none', 'any'), ('cp31', 'none', 'any'), ('cp30', 'none', 'any'), ('py
35', 'none', 'any'), ('py3', 'none', 'any'), ('py34', 'none', 'any'), ('py33', '
none', 'any'), ('py32', 'none', 'any'), ('py31', 'none', 'any'), ('py30', 'none'
, 'any')]
>>>
查看支持的格式后,修改为格式为支持的样式:
python_Levenshtein-0.12.0-cp35-none-win_amd64.whl
再进行安装就成功了!!
D:\intall_path\some_whl>pip install python_Levenshtein-0.12.0-cp35-none-win_amd6
4.whl
Processing d:\intall_path\some_whl\python_levenshtein-0.12.0-cp35-none-win_amd64
.whl
Installing collected packages: python-Levenshtein
Successfully installed python-Levenshtein-0.12.0

在尝试安装Python_Levenshtein-0.12.0的whl文件时遇到错误提示'not a supported wheel on this platform'。问题在于原始whl文件的构建标识不匹配本地环境。通过查看pip支持的PEP425标签,发现需要的是无abi(none)的whl文件。将whl文件重命名为匹配的格式后,成功安装。

3119

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



