【发布时间】:2020-02-15 17:57:17
【问题描述】:
我对 Python 编码比较陌生,想了解 Python 中的统计和数据管理。为此,我想安装 Matplotlib,这给了我一些问题。
我看到其他人遇到这个问题,但我还没有完全理解如何解决它。
安装我使用
pip install matplotlib
我安装了以下规格
- Windows 10
- Python 3.8
- 微软工作室 2019
我遇到的第一个错误是安装 Microsoft Studio,所以我就这样做了。 我也尝试过更新点子
BUILDING MATPLOTLIB
matplotlib: yes [3.1.1]
python: yes [3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:21:23) [MSC v.1916 32 bit (Intel)]]
platform: yes [win32]
...
checkdep_freetype2.c
src/checkdep_freetype2.c(1): fatal error C1083: Cannot open include file: 'ft2build.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.23.28105\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1:
【问题讨论】:
-
您面临的问题来自于matplotlib的构建过程失败。但是,通常情况下,matplotlib 将在大多数主要平台的 pip 上提供轮子,所以我想知道为什么它仍在尝试编译任何东西。命令行中的消息是否说明了它正在尝试构建哪个版本?
-
嗨 IMportanceOfBeingErnest 你的意思是这样的吗?构建 MATPLOTLIB matplotlib: 是 [3.1.1] python: 是 [3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:21:23) [MSC v.1916 32 bit (Intel)]] 平台:是的 [win32] 实际上我两天前刚刚安装了 Python,今天刚刚尝试安装 MatPlotLib。我安装了 Numpy 没有任何问题。
标签: python matplotlib installation