开发者社区> 问答> 正文

matplotlib 安装?报错

1.系统环境 python----->2.7.3 ubuntu ----> 12.04 pip ---->9.0.1

2.在使用pip install matplotlib 报错:

Complete output from command python setup.py egg_info:
============================================================================
Edit setup.cfg to change the build options

BUILDING MATPLOTLIB
            matplotlib: yes [2.0.2]
                python: yes [2.7.3 (default, Jun 22 2015, 19:43:34)  [GCC
                        4.6.3]]
              platform: yes [linux2]

REQUIRED DEPENDENCIES AND EXTENSIONS
                 numpy: yes [version 1.13.1]
                   six: yes [using six version 1.10.0]
              dateutil: yes [using dateutil version 1.5]
           functools32: yes [functools32 was not found. It is required
                        forPython versions prior to 3.2]
          subprocess32: yes [subprocess32 was not found. It used  for Python
                        versions prior to 3.2 to improves functionality on
                        Linux and OSX]
                  pytz: yes [using pytz version 2017.2]
                cycler: yes [cycler was not found. pip will attempt to
                        install it after matplotlib.]
               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.]
                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: no  [skipping due to configuration]
        toolkits_tests: no  [skipping due to configuration]

OPTIONAL BACKEND EXTENSIONS
                macosx: no  [Mac OS-X only]
                qt5agg: no  [PyQt5 not found]
                qt4agg: no  [PySide not found; PyQt4 not found]
               gtk3agg: yes [installing, version 3.2.4]
             gtk3cairo: yes [installing, version 3.2.4]
                gtkagg: no  [The C/C++ header for gtk (gtk/gtk.h) could not
                        be found.  You may need to install the development
                        package.]
                 tkagg: yes [installing; run-time loading from Python Tcl /
                        Tk]
                 wxagg: no  [requires wxPython]
                   gtk: no  [The C/C++ header for gtk (gtk/gtk.h) could not
                        be found.  You may need to install the development
                        package.]
                   agg: yes [installing]
                 cairo: yes [installing, pycairo version 1.8.8]
             windowing: no  [Microsoft Windows only]

OPTIONAL LATEX DEPENDENCIES
                dvipng: no
           ghostscript: yes [version 9.05]
                 latex: no
               pdftops: yes [version 0.18.4]

OPTIONAL PACKAGE DATA
                  dlls: no  [skipping due to configuration]

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

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

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-xxOWwU/matplotlib/

pip我已經更新到最新版本了: pip install --upgrade pip

求大神帮忙看看,怎么解决!

展开
收起
爱吃鱼的程序员 2020-06-08 12:43:36 900 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    1.使用apt-getinstall matplotlib 

    2.使用Anaconda重现安装

    2020-06-08 12:43:50
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载