无法安装matplotlib

时间:2017-10-03 21:16:13

标签: python matplotlib

问题:无法在Windows 10环境中的Python 3.3中安装matplotlib v 2.02

C:\Python33>pip install matplotlib

pip安装程序完成了大部分任务,然后给了我这个错误

Command "python setup.py egg_info" failed with error code 1 in c:\users\xxx\appdata\local\temp\pip-build-3ob70y\matplotlib\


C:\Python33>pip install --upgrade setuptools

Requirement already up-to-date: setuptools in c:\python33\lib\site-packages

我尝试了以下

  • 卸载并重新安装
  • 在root而不是Python33文件夹中执行此操作
  • 手动安装maplotlib。这似乎工作,但它然后发现两个丢失的文件(__和循环器)。我用pips分别安装了这些,但后来又抱怨了六个移动

  • 咨询Can't install via pip because of egg_info error

  • 在网上查阅其他几篇文章。有些人认为python 2和pythono 3的要求之间存在冲突。但是看起来这些包应该适用于

以下是详细的pip错误消息

Successfully uninstalled matplotlib-2.1.0rc1

 C:\Python33>pip install matplotlib
    Collecting matplotlib
    Using cached matplotlib-2.0.2.tar.gz
    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: no  [Requires Python 3.4 or later (in the 3.x
                            series)]
                  platform: yes [win32]>

    REQUIRED DEPENDENCIES AND EXTENSIONS

                     numpy: yes [version 1.7.1]
                       six: yes [The installed version of six is 1.3.0 but a >                        the  minimum required version is 1.10. pip/easy > 
                           install will attempt to install a newer version.]
                  dateutil: yes [using dateutil version 2.1]
               functools32: yes [Not required]
              subprocess32: yes [Not required]
                      pytz: yes [pytz was not found. pip will attempt to 
                             install it after matplotlib.]
                    cycler: yes [using cycler version 0.10.0]
                   tornado: yes [using tornado version 4.4.2]
                 pyparsing: yes [using pyparsing version 2.2.0]
                    libagg: yes [pkg-config information for 'libagg' could 
                            not be found. Using local copy.]
                  freetype: no  [The C/C++ header for freetype (ft2build.h)
                            could not be found.  You may need to install the
                            development package.]
                       png: no  [The C/C++ header for png (png.h) could not 
                          be found.  You may need to install the development
                            package.]
                     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: no  [Requires pygobject to be installed.]
                 gtk3cairo: no  [Requires cairocffi or pycairo to be 
                                installed.]
                    gtkagg: no  [Requires pygtk]
                     tkagg: yes [installing; run-time loading from Python 
                                 Tcl /     Tk]
                     wxagg: no  [requires wxPython]
                       gtk: no  [Requires pygtk]
                       agg: yes [installing]
                     cairo: no  [cairocffi or pycairo not found]
                 windowing: yes [installing]

    OPTIONAL LATEX DEPENDENCIES
                    dvipng: yes [version 1.15]
               ghostscript: yes [version 9.19]
                     latex: yes [version MiKTeX 2.9]
                   pdftops: yes [version 0.46.0]

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



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

    ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in 
    c:\users\xxx\appdata\local\temp\pip-build-3ob70y\matplotlib\

1 个答案:

答案 0 :(得分:1)

作为Python包索引https://pypi.python.org/pypi/matplotlib/中Matplotlib的正式版,它仅支持以下Python版本:

  • Python :: 2.7
  • Python :: 3.4
  • Python :: 3.5
  • Python :: 3.6

因此,您无法在Python 3.3中安装matplotlib 2.1.0rc1(使用pip install matplotlib获得的版本)。