通过pip在Windows上安装matplotlib会导致错误

2024-04-29 13:26:52 发布

您现在位置:Python中文网/ 问答频道 /正文

我试着通过pip安装各种库,除了matplotlib之外,它们都成功了。 我使用Windows 10,我安装了C++ 14。p>

完整错误输出:https://pastebin.com/Z3uhcZ0k

错误摘录:

Collecting matplotlib
  Using cached matplotlib-3.3.2.tar.gz (37.9 MB)
Requirement already satisfied: certifi>=2020.06.20 in c:\users\pwegner\pycharmprojects\pythonproject\venv\lib\site-packages (from matplotlib) (2020.6.20)
Requirement already satisfied: cycler>=0.10 in c:\users\pwegner\pycharmprojects\pythonproject\venv\lib\site-packages (from matplotlib) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\pwegner\pycharmprojects\pythonproject\venv\lib\site-packages (from matplotlib) (1.3.1)
Requirement already satisfied: numpy>=1.15 in c:\users\pwegner\pycharmprojects\pythonproject\venv\lib\site-packages (from matplotlib) (1.19.4)
Requirement already satisfied: pillow>=6.2.0 in c:\users\pwegner\pycharmprojects\pythonproject\venv\lib\site-packages (from matplotlib) (8.0.1)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in c:\users\pwegner\pycharmprojects\pythonproject\venv\lib\site-packages (from matplotlib) (2.4.7)
Requirement already satisfied: python-dateutil>=2.1 in c:\users\pwegner\pycharmprojects\pythonproject\venv\lib\site-packages (from matplotlib) (2.8.1)
Requirement already satisfied: six in c:\users\pwegner\pycharmprojects\pythonproject\venv\lib\site-packages (from cycler>=0.10->matplotlib) (1.15.0)
Using legacy 'setup.py install' for matplotlib, since package 'wheel' is not installed.
Installing collected packages: matplotlib
    Running setup.py install for matplotlib: started
    Running setup.py install for matplotlib: finished with status 'error'


ERROR: Command errored out with exit status 1: 'C:\Users\pwegner\PycharmProjects\pythonProject\venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\pwegner\\AppData\\Local\\Temp\\pycharm-packaging\\matplotlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\pwegner\\AppData\\Local\\Temp\\pycharm-packaging\\matplotlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\pwegner\AppData\Local\Temp\pip-record-h8c_iaw3\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\pwegner\PycharmProjects\pythonProject\venv\include\site\python3.9\matplotlib' Check the logs for full command output.

我不太明白我在这里要做什么。 关于如何完成安装有什么想法吗