不能easy_install matplotlib mac(10.9.5)

时间:2015-04-03 15:35:40

标签: python macos matplotlib

不确定该做什么,因为easy_install进程稍微不透明(只是日志)。

很高兴出错,但似乎没有完成。

错误日志如下:

jasons-mbp:~ myname$ easy_install matplotlib
Searching for matplotlib
Reading https://pypi.python.org/simple/matplotlib/
Reading http://matplotlib.org
Reading http://matplotlib.sourceforge.net
Reading http://sourceforge.net/project/showfiles.php?group_id=80706
Reading http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474
Reading http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.0/
Reading http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.1/
Reading https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=278194
Reading https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.1/
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.3/
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0.1/
Best match: matplotlib 1.4.3
Downloading https://pypi.python.org/packages/source/m/matplotlib/matplotlib-1.4.3.tar.gz#md5=86af2e3e3c61849ac7576a6f5ca44267
Processing matplotlib-1.4.3.tar.gz
Writing /var/folders/8x/0msd5dd13l9453ff9739rj7w0000gn/T/easy_install-u4L4VQ/matplotlib-1.4.3/setup.cfg
Running matplotlib-1.4.3/setup.py -q bdist_egg --dist-dir /var/folders/8x/0msd5dd13l9453ff9739rj7w0000gn/T/easy_install-u4L4VQ/matplotlib-1.4.3/egg-dist-tmp-3diPAe
IMPORTANT WARNING:
    pkg-config is not installed.
    matplotlib may not be able to find some of its dependencies
============================================================================
Edit setup.cfg to change the build options

BUILDING MATPLOTLIB
            matplotlib: yes [1.4.3]
                python: yes [2.7.6 (v2.7.6:3a1db0d2747e, Nov 10 2013,
                        00:42:54)  [GCC 4.2.1 (Apple Inc. build 5666) (dot
                        3)]]
              platform: yes [darwin]

REQUIRED DEPENDENCIES AND EXTENSIONS
                 numpy: yes [version 1.8.1]
                   six: yes [using six version 1.7.2]
              dateutil: yes [using dateutil version 2.2]
                  pytz: yes [using pytz version 2014.4]
               tornado: yes [tornado was not found. It is required for the
                        WebAgg backend. pip/easy_install may attempt to
                        install it after matplotlib.]
             pyparsing: yes [pyparsing was not found. It is required for
                        mathtext support. pip/easy_install may attempt to
                        install it after matplotlib.]
                 pycxx: yes [Couldn't import.  Using local copy.]
                libagg: yes [pkg-config information for 'libagg' could not
                        be found. Using local copy.]
              freetype: no  [The C/C++ header for freetype2 (ft2build.h)
                        could not be found.  You may need to install the
                        development package.]
                   png: no  [pkg-config information for 'libpng' could not
                        be found.]
                 qhull: yes [pkg-config information for 'qhull' could not be
                        found. Using local copy.]

OPTIONAL SUBPACKAGES
           sample_data: yes [installing]
              toolkits: yes [installing]
                 tests: yes [nose 0.11.1 or later is required to run the
                        matplotlib test suite.  pip/easy_install may attempt
                        to install it after matplotlib. / mock is required
                        to run the matplotlib test suite.  pip/easy_install
                        may attempt to install it after matplotlib.]
        toolkits_tests: yes [nose 0.11.1 or later is required to run the
                        matplotlib test suite.  pip/easy_install may attempt
                        to install it after matplotlib. / mock is required
                        to run the matplotlib test suite.  pip/easy_install
                        may attempt to install it after matplotlib.]

OPTIONAL BACKEND EXTENSIONS
                macosx: yes [installing, darwin]
                qt5agg: no  [PyQt5 not found]
                qt4agg: no  [PyQt4 not found]
                pyside: no  [PySide not found]
               gtk3agg: no  [Requires pygobject to be installed.]
             gtk3cairo: no  [Requires cairocffi or pycairo to be installed.]
                gtkagg: no  [Requires pygtk]
                 tkagg: yes [installing, version 81008]
                 wxagg: no  [requires wxPython]
                   gtk: no  [Requires pygtk]
                   agg: yes [installing]
                 cairo: no  [cairocffi or pycairo not found]
             windowing: no  [Microsoft Windows only]

OPTIONAL LATEX DEPENDENCIES
                dvipng: no
           ghostscript: no
                 latex: no
               pdftops: no

============================================================================
                        * The following required packages can not be built:
                        * freetype, png
error: Setup script exited with 1
jasons-mbp:~ myname$ 

1 个答案:

答案 0 :(得分:0)

我在centOS上遇到了同样的问题,我解决了这个问题:

yum install freetype freetype-devel
yum install libpng libpng-devel

希望这会有所帮助:)