【发布时间】:2012-08-31 19:31:08
【问题描述】:
我正在尝试安装 matplotlib,但遇到了很多问题。我从 pip install matplotlib 以及尝试从源代码构建都收到一个常见错误:
BUILDING MATPLOTLIB
matplotlib: 1.1.1
python: 2.7.2 (default, Jun 20 2012, 16:23:33) [GCC 4.2.1
Compatible Apple Clang 4.0
(tags/Apple/clang-418.0.60)]
platform: darwin
所需的依赖项
numpy: 1.6.1
* Could not find the headers for numpy. You may
* need to install the development package.
编辑:终于解决了。我需要安装 gfortran 和 gcc 编译器。是用 brew 做的吗,一切都像魅力一样!
【问题讨论】:
-
从源代码构建应该没问题(至少使用 git 的最新版本)。但是你需要确保 numpy 的头文件在链接器路径中。
标签: python macos matplotlib