【问题标题】:Issue with matplotlib install with pip [duplicate]使用 pip 安装 matplotlib 的问题 [重复]
【发布时间】:2021-02-17 03:58:30
【问题描述】:

在 Visual Studio Code 中使用命令 pip install matplotlib 安装 matplotlib 时出现一些错误。这是错误状态

Running setup.py install for matplotlib ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\lenovo\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Lenovo\\AppData\\Local\\Temp\\pip-install-ebe54zpw\\matplotlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Lenovo\\AppData\\Local\\Temp\\pip-install-ebe54zpw\\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\Lenovo\AppData\Local\Temp\pip-record-r6a9f5rh\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\lenovo\appdata\local\programs\python\python39\Include\matplotlib'
         cwd: C:\Users\Lenovo\AppData\Local\Temp\pip-install-ebe54zpw\matplotlib\
    .
    .
    .
    UPDATING build\lib.win32-3.9\matplotlib\_version.py
    set build\lib.win32-3.9\matplotlib\_version.py to '3.3.2'
    running build_ext
    error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
    Extracting freetype-2.6.1.tar.gz
    Building freetype in build\freetype-2.6.1
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\lenovo\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Lenovo\\AppData\\Local\\Temp\\pip-install-ebe54zpw\\matplotlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Lenovo\\AppData\\Local\\Temp\\pip-install-ebe54zpw\\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\Lenovo\AppData\Local\Temp\pip-record-r6a9f5rh\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\lenovo\appdata\local\programs\python\python39\Include\matplotlib' Check the logs for full command output.

希望得到解决方案,谢谢..

【问题讨论】:

标签: python matplotlib pip


【解决方案1】:

如您所见;

error: Microsoft Visual C++ 14.0 is required

这是你的问题。

【讨论】:

  • 好的,让我尝试在 Visual Studio 构建工具中安装 C++
猜你喜欢
  • 2018-07-05
  • 1970-01-01
  • 1970-01-01
  • 2014-03-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-06-30
  • 2021-05-11
相关资源
最近更新 更多