pip安装报错:is not a supported wheel on this platform
可能的原因1:
安装的不是对应python版本的库,下载的库名中cp27代表python2.7,其它同理。
可能的原因2:
(下载的是对应版本的库,然后仍然提示不支持当前平台)
我下载到的numpy库文件名:
使用pip安装(在命令行中):
报错:*** is not a supported wheel on this platform
方法(32 位系统的):在shell中输入import pip; print(pip.pep425tags.get_supported()) 可以获取到pip支持的文件名还有版本,我这里如下:
>>import pip; print(pip.pep425tags.get_supported())
[('cp27',
'none', 'win32'), ('py2', 'none', 'win32'), ('cp27', 'none', 'any'),
('cp2', 'none', 'any'), ('cp26', 'none', 'any'), ('cp25', 'none',
'any'), ('cp24', 'none', 'any'), ('cp23', 'none', 'any'), ('cp22',
'none', 'any'), ('cp21', 'none', 'any'), ('cp20', 'none', 'any'),
('py27', 'none', 'any'), ('py2', 'none', 'any'), ('py26', 'none',
'any'), ('py25', 'none', 'any'), ('py24', 'none', 'any'), ('py23',
'none', 'any'), ('py22', 'none', 'any'), ('py21', 'none', 'any'),
('py20', 'none', 'any')]
通过这里可以发现上面下载的文件名格式是不支持的,修改为:numpy-1.10.4+mkl-cp27-none-win32.whl即可成功安装。
import pip
import pip._internal.pep425tags
print(pip._internal.pep425tags.get_supported())
[('cp37', 'cp37m', 'win32'), ('cp37', 'none', 'win32'), ('py3', 'none', 'win32'), ('cp37', 'none', 'any'), ('cp3', 'none', 'any'), ('py37', 'none', 'any'), ('py3', 'none', 'any'), ('py36', 'none', 'any'), ('py35', 'none', 'any'), ('py34', 'none', 'any'), ('py33', 'none', 'any'), ('py32', 'none', 'any'), ('py31', 'none', 'any'), ('py30', 'none', 'any')]
C:\Users\Administrator\PycharmProjects\untitled\venv\Scripts>python
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 19:29:22) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyaudio
Could not import the PyAudio C module '_portaudio'.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Administrator\PycharmProjects\untitled\venv\lib\site-packages\pyaudio.py", line 116, in <module>
import _portaudio as pa
ModuleNotFoundError: No module named '_portaudio'
>>>
pip install pipwin
pipwin install pyaudio