python|下载matplotlib失败

手欠卸载重新下载了python3.9,连接pycharm后准备下载matplotlib但是发现失败,尝试了几种方法但是都失败,终于搞好之后记录一下各种下载库的方法。

  • 方法一:pycharm里直接下载

  • 方法二:CMD里升级pip后再下载(网上好多人都是这个办法
    pip install xxx

  • 方法三:借助国内镜像在CMD里下载
    pip install -i https://pypi.tuna.tsinghua.edu.cn/simple xxx

  • 方法四:通过官网(https://www.lfd.uci.edu/~gohlke/pythonlibs/#kiwisolver)
    下载相应的whl文件,再通过CMD下载
    pip install C:\Users\xxx\kiwisolver-1.2.0-cp39-cp39-win_amd64.whl

我遇到的问题是:
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

根据前面的信息:
Processing c:\users\xxx\matplotlib-3.3.2-cp39-cp39-win_amd64.whl
Requirement already satisfied: certifi>=2020.06.20 in c:\users\xxx\appdata\local\programs\python\python39\lib\site-packages (from matplotlib3.3.2) (2020.6.20)
Requirement already satisfied: python-dateutil>=2.1 in c:\users\xxx\appdata\local\programs\python\python39\lib\site-packages (from matplotlib
3.3.2) (2.8.1)
Requirement already satisfied: numpy>=1.15 in c:\users\xxx\appdata\local\programs\python\python39\lib\site-packages (from matplotlib3.3.2) (1.19.2+mkl)
Requirement already satisfied: cycler>=0.10 in c:\users\xxx\appdata\local\programs\python\python39\lib\site-packages (from matplotlib
3.3.2) (0.10.0)
Requirement already satisfied: pillow>=6.2.0 in c:\users\xxx\appdata\local\programs\python\python39\lib\site-packages (from matplotlib==3.3.2) (7.2.0)
Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3
Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Collecting kiwisolver>=1.0.1
Using cached kiwisolver-1.2.0.tar.gz (52 kB)

最终是在官网上下载了pillow、kiwisolver、cycler几个包安装之后就成功安上了matplotlib啦 :)

你可能感兴趣的:(python)