繁体   English   中英

python 3.5的matplotlib安装错误

[英]matplotlib installation error with python 3.5

我正在尝试使用 Python 3.5 在 OS X Yosemite 上安装 matplotlib。 已经安装的软件包是:

appnope (0.1.0)
decorator (4.0.2)
gnureadline (6.3.3)
ipython (4.0.0)
ipython-genutils (0.1.0)
nose (1.3.7)
numpy (1.9.2)
pandas (0.16.2)
path.py (8.1.1)
pbr (1.8.0)
pexpect (3.3)
pickleshare (0.5)
pip (7.1.2)
Pygments (2.0.2)
python-dateutil (2.4.2)
pytz (2015.4)
pyzmq (14.7.0)
scipy (0.16.0)
setuptools (18.3.1)
simplegeneric (0.8.1)
six (1.9.0)
stevedore (1.8.0)
sympy (0.7.6.1)
traitlets (4.0.0)
virtualenv (13.1.2)
virtualenv-clone (0.2.6)
virtualenvwrapper (4.7.1)
wheel (0.24.0)

而且

freetype-config --version 18.0.12

我已经通过 Macport 安装了 freetype

但是我不断收到以下错误:

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/_t/n0g5nl692778w02hdlnf127h0000gn/T/pip-build-82786k0f/matplotlib

我在安装命令后收到的完整消息是:

 pip3 install matplotlib

Collecting matplotlib
  Using cached matplotlib-1.4.3.tar.gz
    Complete output from command python setup.py egg_info:
    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 [3.5.0 (v3.5.0:374f501f4567, Sep 12 2015,
                            11:00:19)  [GCC 4.2.1 (Apple Inc. build 5666) (dot
                            3)]]
                  platform: yes [darwin]

    REQUIRED DEPENDENCIES AND EXTENSIONS
                     numpy: yes [version 1.9.2]
                       six: yes [using six version 1.9.0]
                  dateutil: yes [using dateutil version 2.4.2]
                      pytz: yes [using pytz version 2015.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 [Official versions of PyCXX are not compatible
                            with matplotlib on Python 3.x, since they lack
                            support for the buffer object.  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: yes [version 1.6.18]
                     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 [using nose version 1.3.7 / using unittest.mock]
            toolkits_tests: yes [using nose version 1.3.7 / using unittest.mock]

    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 version not identified]
                     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: yes [version 1.15]
               ghostscript: yes [version 9.16]
                     latex: yes [version 3.14159265]
                   pdftops: no

    ============================================================================
                            * The following required packages can not be built:
                            * freetype

    ----------------------------------------

看来您还没有安装pkg-config

只需通过brew安装它:

brew install pkg-config

为了更安全,还安装未解析的依赖项:

pip3 install tornado pyparsing

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM