我已经尝试将 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/