python - 使用 pip 安装 matplotlib 的问题
问题描述
pip install matplotlib
在 Visual Studio Code 中使用命令安装 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.
希望得到解决方案,谢谢。。
解决方案
正如你在这里看到的;
error: Microsoft Visual C++ 14.0 is required
这是你的问题。
推荐阅读
- node.js - 使用 Nodejs 无法通过 Gmail smtp 发送电子邮件
- azure - Azure API 检索 SAS 策略,错误 InvalidHostName
- c++ - 如何将重载/模板函数传递给 C++ 中的算法?
- networking - ifdown:未配置接口 eth0 错误:???前缀是预期的,而不是
- kubernetes - 当它是 coredns 时,minikube 将 dns 显示为 Kubedns
- javascript - Can't see value from API in b-form-select - Vue.js
- protocol-buffers - Is it dangerous to name a protobuf field message?
- java - Spring WS 产生通知而不是请求响应
- amazon-web-services - RDS 数据库集群快照的错误列表标签
- python - 为什么 Series.apply 在带有间隔的列上如此之快?