【问题标题】:Issue with installing matplotlib in windows在 Windows 中安装 matplotlib 的问题
【发布时间】:2016-04-28 22:01:03
【问题描述】:

我正在尝试使用 windows 安装 matplotlib,但我做不到。我是 python 的初学者,所以我的错误可能是基本的和/或我的问题很愚蠢,但我无法在任何地方找到答案。

我访问了 matplotlib 网站并使用 easy_install 安装了所有依赖项。我遇到了 freetype 和 png 的问题。我在输入“easy_install matplotlib”时显示的消息末尾下方进行复制

    gtkagg: no  [Requires pygtk]
                 tkagg: no  [The C/C++ header for Tk (tk.h) could not be
                        found.  You may need to install the development
                        package.]
                 wxagg: no  [requires wxPython]
                   gtk: no  [Requires pygtk]
                   agg: yes [installing]
                 cairo: no  [cairocffi or pycairo not found]
             windowing: yes [installing, 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
error: Setup script exited with 1

如您所见,我缺少 2 个软件包,我不知道如何安装它们。我尝试自己下载它们并将它们放在我的 python 文件夹的“sites-packages”子文件夹中,但似乎没有任何效果。

【问题讨论】:

    标签: python matplotlib


    【解决方案1】:

    您要执行的操作需要安装各种编译器和头文件,因为这些模块依赖于 C 语言中的工作,需要针对您的系统进行编译。请考虑安装 anaconda python 发行版;它是免费的,并且有所有预编译的包来使用 python 进行 STEM 工作。

    他们制作了 2.7 和 3.5 版本,我推荐 3.5 但这只是我 :-) 祝你好运,希望你能让它工作!

    https://www.continuum.io/downloads#_windows

    【讨论】:

      猜你喜欢
      • 2020-08-09
      • 2014-07-23
      • 2011-01-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-27
      • 2021-01-24
      相关资源
      最近更新 更多