LINUX学习:pip 安装Matplotlib报错 png can not be built

LINUX学习:pip 安装Matplotlib报错 png can not be built,第1张

概述介绍《LINUX学习:pip 安装Matplotlib报错 png can not be built》开发教程,希望对您有用。

《liNUX学习:pip 安装Matplotlib报错 png can not be built》要点:
本文介绍了liNUX学习:pip 安装Matplotlib报错 png can not be built,希望对您有用。如果有疑问,可以联系我们。

pip 安装Matplotlib的时候报如下差错

[root@biostacs /]# pip install matplotlib --upgradeCollecting matplotlib  Downloading matplotlib-1.5.1.tar.gz (54.0MB)    100% |████████████████████████████████| 54.0MB 12kB/s    Complete output from command python setup.py egg_info:    ============================================================================    Edit setup.cfg to change the build options    BUILDING MATPLOTliB                matplotlib: yes [1.5.1]                    python: yes [2.7.5 (default,Nov 20 2015,02:00:19)  [GCC                            4.8.5 20150623 (Red Hat 4.8.5-4)]]                  platform: yes [linux2]    required DEPENDENCIES AND EXTENSIONS                     numpy: yes [version 1.7.1]                  dateutil: yes [using dateutil version 1.5]                      pytz: yes [using pytz version 2012d]                    cycler: yes [cycler was not found. pip will attempt to                            install it after matplotlib.]                   tornado: yes [using tornado version 4.2.1]                 pyparsing: yes [Your pyparsing contains a BUG that will be                            monkey-patched by matplotlib.  For best results,upgrade to pyparsing 2.0.1 or later.]                    libagg: yes [pkg-config information for 'libagg' Could not                            be found. Using local copy.]                  freetype: yes [version 2.4.11]                       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 [using nose version 1.3.0 / mock is required to                            run the matplotlib test suite. Please install it                            with pip or your preferred tool to run the test                            suite]            toolkits_tests: yes [using nose version 1.3.0 / mock is required to                            run the matplotlib test suite. Please install it                            with pip or your preferred tool to run the test                            suite]    OPTIONAL BACKEND EXTENSIONS                    macosx: no  [Mac OS-X only]                    qt5agg: no  [PyQt5 not found]                    qt4agg: no  [PySIDe not found; PyQt4 not found]    ** (-c:3688): WARNING **: Could not open X display                   gtk3agg: yes [installing,version 3.13.14]    ** (-c:3699): WARNING **: Could not open X display                 gtk3cairo: yes [installing,version 3.13.14]                    gtkagg: no  [pygtk present,but import Failed.]                     tkagg: no  [TKAgg requires Tkinter.]                     wxagg: no  [requires wxPython]                       gtk: no  [pygtk present,but import Failed.]                       agg: yes [installing]                     cairo: yes [installing,pycairo version 1.8.10]                 windowing: no  [Microsoft windows only]    OPTIONAL LATEX DEPENDENCIES                    dvipng: yes [version 1.14]               ghostscript: yes [version 9.07]                     latex: yes [version 3.1415926]                   pdftops: yes [version 0.26.5]    OPTIONAL PACKAGE DATA                      dlls: no  [skipPing due to configuration]    ============================================================================                            * The following required packages can not be built:                            * png    ----------------------------------------

png无法建立,如果不知道这些库必要安装的包名,可以查一下:

[root@biostacs /]# yum search png | grep devellibpng-devel.i686 : Development tools for programs to manipulate PNG imagelibpng-devel.x86_64 : Development tools for programs to manipulate PNG image

安装libpng

 yum -y install libpng-devel

pip 安装matplotlib

[root@biostacs /]# pip install matplotlib --upgradeYou are using pip version 7.1.0,however version 8.1.2 is available.You should consIDer upgrading via the 'pip install --upgrade pip' command.Collecting matplotlib  Using cached matplotlib-1.5.1.tar.gzCollecting numpy>=1.6 (from matplotlib)  Downloading numpy-1.11.1.zip (4.7MB)    100% |████████████████████████████████| 4.7MB 118kB/sCollecting python-dateutil (from matplotlib)  Downloading python_dateutil-2.5.3-py2.py3-none-any.whl (201kB)    100% |████████████████████████████████| 204kB 1.4MB/sCollecting pytz (from matplotlib)  Downloading pytz-2016.6.1-py2.py3-none-any.whl (481kB)    100% |████████████████████████████████| 483kB 912kB/sCollecting cycler (from matplotlib)  Downloading cycler-0.10.0-py2.py3-none-any.whlCollecting pyparsing!=2.0.0,!=2.0.4,>=1.5.6 (from matplotlib)  Downloading pyparsing-2.1.5-py2.py3-none-any.whl (42kB)    100% |████████████████████████████████| 45kB 1.1MB/sCollecting six>=1.5 (from python-dateutil->matplotlib)  Using cached six-1.10.0-py2.py3-none-any.whlBuilding wheels for collected packages: matplotlib,numpy  Running setup.py bdist_wheel for matplotlib  Stored in directory: /root/.cache/pip/wheels/d8/38/3c/a388e11fd09f9b23f5e4cd74594197394d9fd65f91f64c4aa7  Running setup.py bdist_wheel for numpy  Stored in directory: /root/.cache/pip/wheels/10/1d/d8/608bdeaee5aad9e278259fa68d21a29c995a9117a250f7be26Successfully built matplotlib numpyInstalling collected packages: numpy,six,python-dateutil,pytz,cycler,pyparsing,matplotlib  Found existing installation: numpy 1.11.0    Uninstalling numpy-1.11.0:      Successfully uninstalled numpy-1.11.0  Found existing installation: six 1.9.0    Uninstalling six-1.9.0:      Successfully uninstalled six-1.9.0  Found existing installation: python-dateutil 1.5    Uninstalling python-dateutil-1.5:      Successfully uninstalled python-dateutil-1.5  Found existing installation: pytz 2012d    DEPRECATION: Uninstalling a distutils installed project (pytz) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.    Uninstalling pytz-2012d:      Successfully uninstalled pytz-2012d  Found existing installation: pyparsing 1.5.6    DEPRECATION: Uninstalling a distutils installed project (pyparsing) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.    Uninstalling pyparsing-1.5.6:      Successfully uninstalled pyparsing-1.5.6  Found existing installation: matplotlib 1.2.0    DEPRECATION: Uninstalling a distutils installed project (matplotlib) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.    Uninstalling matplotlib-1.2.0:      Successfully uninstalled matplotlib-1.2.0Successfully installed cycler-0.10.0 matplotlib-1.5.1 numpy-1.11.1 pyparsing-2.1.5 python-dateutil-2.5.3 pytz-2016.6.1 six-1.10.0

胜利了…

本文永远更新链接地址

学习更多liNUX教程,请查看站内专栏,如果有liNUX疑问,可以加QQ交流《liNUX学习:pip 安装Matplotlib报错 png can not be built》。

总结

以上是内存溢出为你收集整理的LINUX学习:pip 安装Matplotlib报错 png can not be built全部内容,希望文章能够帮你解决LINUX学习:pip 安装Matplotlib报错 png can not be built所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/1041739.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)

保存