在Mac OSX Mountain Lion上安装matplotlib

Ami*_*ash 5 python macos matplotlib

我正在尝试安装matplotlib但面临许多问题.我收到来自pip install matplotlib的常见错误以及尝试从source构建,它是:

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
Run Code Online (Sandbox Code Playgroud)

需要的依赖

             numpy: 1.6.1

                    * Could not find the headers for numpy.  You may

                    * need to install the development package.
Run Code Online (Sandbox Code Playgroud)

编辑:终于解决了.我需要安装gfortran和gcc编译器.它是否使用brew,一切都像魅力一样!

Ami*_*ash 2

终于解决了。我需要安装 gfortran 和 gcc 编译器。是用brew做的吗,一切都很顺利!