错误在cygwin中安装matplotlib

时间:2013-11-22 01:28:51

标签: 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

2 个答案:

答案 0 :(得分:0)

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

答案 1 :(得分:0)

也许有人不熟悉像我这样的道路。 lib是下载的matplotlib_XXXversion.gz中的文件夹之一。花费文件夹后找到_tri.h以及_tri.cpp,重命名varilabe _C accroding to post link over above。然后可以使用安装它 easy_install安装文件位置(matplotlib_xxxxversion的扩展目录..)