UnsupportedWheel: matplotlib.xxx.whl is not a supported wheel on this platform解决方案

安装画图工具matplotlib时报错:

UnsupportedWheel: matplotlib-2.0.2-cp27-cp27m-win_amd64.whl is not a supported wheel on this platform.

可在pip.log中查看报错日志:

------------------------------------------------------------
C:\Python27\lib\site-packages\pip\__main__.py run on 08/28/17 09:46:01
matplotlib-2.0.2-cp27-cp27m-win_amd64.whl is not a supported wheel on this platform.
Exception information:
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\pip\basecommand.py", line 122, in main
    status = self.run(options, args)
  File "C:\Python27\lib\site-packages\pip\commands\install.py", line 257, in run
    InstallRequirement.from_line(name, None))
  File "C:\Python27\lib\site-packages\pip\req.py", line 167, in from_line
    raise UnsupportedWheel("%s is not a supported wheel on this platform." % wheel.filename)
UnsupportedWheel: matplotlib-2.0.2-cp27-cp27m-win_amd64.whl is not a supported wheel on this platform.

出现这种情况,需要确认以下几点:

1. python的版本:2.7还是3.5或其他

2. 电脑版本:32位还是64位

3. pip是否过期


确认使用的python版本为2.7,电脑版本为64位后,尝试

python -m pip install --upgrade pip


后,安装matplotlib成功

Collecting python-dateutil (from matplotlib==2.0.2)
  Downloading python_dateutil-2.6.1-py2.py3-none-any.whl (194kB)
    42% |█████████████▌                  | 81kB 31kB/s eta 0:00:04
    47% |███████████████▏                | 92kB 33kB/s eta 0:00:
    52% |████████████████▉               | 102kB 34kB/s eta 0:0
    57% |██████████████████▋             | 112kB 37kB/s eta 0
    63% |████████████████████▎           | 122kB 32kB/s eta
    68% |██████████████████████          | 133kB 36kB/s et
    73% |███████████████████████▋        | 143kB 38kB/s
    79% |█████████████████████████▎      | 153kB 29kB/
    84% |███████████████████████████     | 163kB 29kB
    89% |████████████████████████████▊   | 174kB 28
    94% |██████████████████████████████▍ | 184kB
    100% |████████████████████████████████| 194k
B 28kB/s
Installing collected packages: six, cycler, functools32, pytz, pyparsing, numpy,
 python-dateutil, matplotlib
  Running setup.py install for functools32 ... done
Successfully installed cycler-0.10.0 functools32-3.2.3.post2 matplotlib-2.0.2 nu
mpy-1.13.1 pyparsing-2.2.0 python-dateutil-2.6.1 pytz-2017.2 six-1.10.0


你可能感兴趣的:(Python,python,matplotlib)