查看whl包名是否满足系统的条件的命令,以此解决whl包出现“is not a supported wheel on this platform”错误提示的问题

在Ubuntu系统中,使用pip安装whl包时,常常会报如下错误:
tensorflow_gpu-1.11.0-cp35-cp35m-manylinux1_x86_64.whl is not a supported wheel on this platform.
这是因为该whl包不满足系统的命名规则,下面是查看满足系统命名规则的命令:首先进入python3,然后输入以下命令

>>> import pip >>> print(pip.pep425tags.get_supported()) [('cp35', 'cp35m', 'win_amd64'), ('cp35', 'none', 'win_amd64'), ('py3', 'none', 'win_amd64'), ('cp35', 'none', 'any'), ('cp3', 'none', 'any'), ('py35', 'none', 'any'), ('py3', 'none', 'any'), ('py34', 'none', 'any'), ('py33', 'none', 'any'), ('py32', 'none', 'any'), ('py31', 'none', 'any'), ('py30', 'none', 'any')]

以上结果显示,只有whl包名满足同一个元组的才符合系统的安装条件,才不会报错
在本例子中,我参考标红的命名规则(其他都一样的),修改tensorflow_gpu-1.11.0-cp35-cp35m-manylinux1_x86_64.whltensorflow_gpu-1.11.0-py3-none-any.whl

之后就可以正常安装了。
原文地址:https://www.cnblogs.com/Jerry-home/p/9839576.html