python安装报错 is not a supported wheel on this platform.

安装python库opencv的时候出现错误opencv_python-3.4.1-cp36-cp36m-win32.whl is not a supported wheel on this platform.

解决办法如下: 
查看pip支持的哪些符号,运行如下命令:

amd64:cpu是x64的,(注意并不是指操作系统是64位的)
import pip._internal
print(pip._internal.pep425tags.get_supported())
1
2
win32:指Windows操作系统
import pip
print(pip.pep425tags.get_supported())
1
2
如果出现如下错误说明用错了命令,用上面两个命令中的另一个就行了。 
AttributeError: module ‘pip’ has no attribute ‘pep425tags’ 
命令运行成功后可以看到如下信息: 

出现了pip支持的符号 
[(‘cp36’, ‘cp36m’, ‘win_amd64’), (‘cp36’, ‘none’, ‘win_amd64’), (‘py3’, ‘none’, ‘win_amd64’), (‘cp36’, ‘none’, ‘any’), (‘cp3’, ‘none’, ‘any’), (‘py36’, ‘none’, ‘any’), (‘py3’, ‘none’, ‘any’), (‘py35’, ‘none’, ‘any’), (‘py34’, ‘none’, ‘any’), (‘py33’, ‘none’, ‘any’), (‘py32’, ‘none’, ‘any’), (‘py31’, ‘none’, ‘any’), (‘py30’, ‘none’, ‘any’)]

我下载的文件名字符号为(‘cp36’,’cp36m’,’win32’),不在支持列表中,然后在python whl页面下载了对应文件opencv_python-3.4.1-cp36-cp36m-win_amd64.whl 
运行命令:

pip install opencv_python-3.4.1-cp36-cp36m-win_amd64.whl
1
输出:Installing collected packages: opencv-python 
Successfully installed opencv-python-3.4.1 
检查验证:

import CV2

不报错,则证明安装成功。

转载自:https://blog.csdn.net/lazyGril_81/article/details/80897401

你可能感兴趣的:(python安装报错 is not a supported wheel on this platform.)