python - 在 cygwin 中安装 matplotlib 时出错

标签 python matplotlib cygwin

我已经尝试将 matplotlib 安装到我的 cygwin 环境中。这是我桌面上安装的错误消息。但是,此安装在我的笔记本电脑上非常成功。两者都使用相同版本的所有内容。有人知道如何解决它吗?

  $ python setup.py install
    basedirlist is: ['/usr/local', '/usr']
    ============================================================================
    BUILDING MATPLOTLIB
                matplotlib: 1.1.1
                    python: 2.7.3 (default, Dec 18 2012, 13:50:09)  [GCC 4.5.3]
                  platform: cygwin

    REQUIRED DEPENDENCIES
                     numpy: 1.7.2rc1
                 freetype2: 16.1.10

    OPTIONAL BACKEND DEPENDENCIES
                    libpng: 1.5.12
    /usr/lib/python2.7/site-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
      warnings.warn(str(e), _gtk.Warning)
                      Gtk+: gtk+: 2.24.22, glib: 2.36.4, pygtk: 2.24.0,
                            pygobject: 2.28.6
           Mac OS X native: no
                        Qt: no
                       Qt4: Qt: 4.8.4, PyQt4: 4.10.2
                    PySide: no
                     Cairo: 1.10.0

    OPTIONAL DATE/TIMEZONE DEPENDENCIES
                  datetime: present, version unknown
                  dateutil: matplotlib will provide
                      pytz: matplotlib will provide
    adding pytz

    OPTIONAL USETEX DEPENDENCIES
                    dvipng: 1.14
          0 [main] python2.7 5112 child_info_fork::abort: address space needed by 'mtrand.dll' (0x410000) is already occupied
    Traceback (most recent call last):
      File "setup.py", line 227, in <module>
        check_for_ghostscript()
      File "/cygdrive/f/matplotlib-1.1.1/setupext.py", line 513, in check_for_ghostscript
        stdin, stdout = run_child_process(command)
      File "/cygdrive/f/matplotlib-1.1.1/setupext.py", line 228, in run_child_process
        close_fds=(sys.platform != 'win32'))
      File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
        errread, errwrite)
      File "/usr/lib/python2.7/subprocess.py", line 1143, in _execute_child
        self.pid = os.fork()
    OSError: [Errno 11] Resource temporarily unavailable

最佳答案

我让 matplotlib 在 Cygwin 下工作,如下所示。 1:从源代码安装 libpng(使用通常的 configure、make、make install); 2:使用 pip install matplotlib 安装 matplotlib(我确实必须更改 ._tri 中的变量名称,如下所述:https://github.com/matplotlib/matplotlib/issues/2463 - 然后一切正常)。

关于python - 在 cygwin 中安装 matplotlib 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20135297/

相关文章:

python - Pandas groupby 忽略某些行值

python - 在python中使用命令行参数将变量设置为c程序的输出

python - 如何在 Matplotlib 中的 x 轴上分配相等的比例?

python - Pandas 线图抑制了一半的 xticks,如何阻止它?

windows - 在 Windows 上使用 cygwin 通过 ssh 连接 minix 通过对等错误重置连接

python - Cygwin 和 Python 2.6

python pandas 从价格数据帧创建相关矩阵

python - Python BeautifulSoup 中的 CSS 选择器

python - 使用 Seaborn 将一维时间序列绘制为一条线,并沿 y 轴绘制边缘直方图

c - 在C中获取进程内存信息