【问题标题】:I can't install matplotlib [duplicate]我无法安装 matplotlib [重复]
【发布时间】:2016-12-28 07:16:12
【问题描述】:

收集matplotlib 使用缓存的 matplotlib-1.5.2.tar.gz 命令 python setup.py egg_info 的完整输出: ================================================== =========================== 编辑 setup.cfg 以更改构建选项

BUILDING MATPLOTLIB
            matplotlib: yes [1.5.2]
                python: yes [3.5.1 (v3.5.1:37a07cee5969, Dec  6 2015,
                        01:38:48) [MSC v.1900 32 bit (Intel)]]
              platform: yes [win32]

REQUIRED DEPENDENCIES AND EXTENSIONS
                 numpy: yes [version 1.11.1]
              dateutil: yes [using dateutil version 2.5.3]
                  pytz: yes [using pytz version 2016.6.1]
                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 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: yes [nose 0.11.1 or later is required to run the
                        matplotlib test suite. Please install it with pip or
                        your preferred tool to run the test suite / using
                        unittest.mock]
        toolkits_tests: yes [nose 0.11.1 or later is required to run the
                        matplotlib test suite. Please install it with pip or
                        your preferred tool to run the test suite / using
                        unittest.mock]

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: no
           ghostscript: no
                 latex: no
               pdftops: no

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

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

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

命令“python setup.py egg_info”在 C:\Users\User\AppData\Local\Temp\pycharm-packaging\matplotlib\ 中出现错误代码 1 失败

我已经尝试卸载并再次安装 pip,但它不起作用。我不知道该怎么办。 :( 如果你能用西班牙语发表评论会对我有很大帮助,我的英语不太好,提前谢谢。

【问题讨论】:

    标签: python matplotlib installation


    【解决方案1】:

    我使用 .whl 文件安装了 matplotlib,它对我有用。我是从这个网站http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib 得到的。下载正确的 .whl 包(即如果您有 Python 3.5.1 64 位下载 matplotlib-2.0.0b3-cp35-cp35m-win_amd64.whl)然后转到文件资源管理器并转到您下载 .whl 文件的文件夹。在文件资源管理器中单击文件 -> 打开命令提示符 -> 以管理员身份打开。然后输入这个

    pip install (fileName.whl)
    

    如果它说 pip 没有找到然后去你在文件资源管理器中下载 python 的地方。转到脚本文件夹并在那里打开它。您可以将 .whl 文件复制并粘贴到脚本文件夹中。然后再次键入 pip install 命令。完成后,您可以通过转到 IDLE 并尝试导入来检查它是否有效

    import matplotlib 
    

    如果它运行,则表示您已正确安装它。这是我知道安装 matplotlib 的唯一方法,如果它不起作用,我很抱歉。

    【讨论】:

    • 我试过了,但不行和 libpng 手动但对于 pip 我不能,也尝试升级 pip 但我的段落出现一个巨大的红色
    • 试试这个。转到控制面板->卸载程序->然后单击python。然后单击卸载/更改。应该会弹出一个屏幕,显示卸载/修复。点击修复。那应该修复python并尝试再做一次。我以前从来没有遇到过 pip 的问题,所以这是我唯一的解决方案,抱歉 :(。编辑:哦,试试这个链接 github.com/pypa/pip/issues/1299
    猜你喜欢
    • 2018-07-05
    • 1970-01-01
    • 2016-10-10
    • 2021-02-01
    • 2018-05-25
    • 2020-02-03
    • 1970-01-01
    • 2020-02-23
    • 2020-02-29
    相关资源
    最近更新 更多