pip安装 matplotlib 时问题记录

来源:互联网 发布:网络棋牌赚钱 编辑:程序博客网 时间:2024/06/15 05:45

在使用pip install matplotlib时遇到如下问题:

root@RaspberryPi:/Pedro/Code# pip install -U matplotlib -i http://pypi.douban.com/simple --trusted-host pypi.douban.comCollecting matplotlib Downloading http://pypi.doubanio.com/packages/6c/90/cf10bb2020d2811da811a49601f6eafcda022c6ccd296fd05aba093dee96/matplotlib-2.1.0.tar.gz (35.7MB)       100% |████████████████████████████████| 35.7MB 2.3MB/s       Complete output from command python setup.py egg_info:       Edit setup.cfg to change the build optionsBUILDING MATPLOTLIB            matplotlib: yes [2.1.0]                python: yes [2.7.12 (default, Nov 20 2017, 18:23:56)  [GCC                        5.4.0 20160609]]              platform: yes [linux2]REQUIRED DEPENDENCIES AND EXTENSIONS                 numpy: yes [version 1.11.0]                   six: yes [using six version 1.10.0]              dateutil: yes [using dateutil version 2.4.2]backports.functools_lru_cache: yes [backports.functools_lru_cache 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 2014.10]                cycler: yes [using cycler version 0.9.0]               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 [using pyparsing version 2.0.3]                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 'libqhull' 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  [PySide2 not found; PyQt5 not found]                qt4agg: no  [PySide not found; PyQt4 not found]               gtk3agg: yes [installing, version 3.9.18]             gtk3cairo: yes [installing, version 3.9.18]                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: yes [installing, version 3.0.2.0]                   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.18]                 latex: no               pdftops: yes [version 0.41.0]OPTIONAL PACKAGE DATA                  dlls: no  [skipping due to configuration]============================================================================                        * The following required packages can not be built:                        * freetype, png * Try installing freetype with `apt-                        * get install libfreetype6-dev` * Try installing png                        * with `apt-get install libpng12-dev`Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-LuoeNd/matplotlib/

通过baidu,找到个解决办法
apt-get install libfreetype6-dev libxft-dev

原创粉丝点击