處理器:x86_64
操作系統:GNU/Linux
發行:Fedora Release 13 (Goddard).
Python 2.6.4
/usr/bin/python
這裏是以下問題:
我想使用Matplotlib生成一些圖和Python。當我從大多數solutions3的聽..似乎有matplotlib和64位體系結構之間的兼容性問題。
我從here
安裝Matplotlib這裏是我的錯誤:
Traceback (most recent call last):
File "plot-thread-characterization.py", line 24, in <module>
import matplotlib.pyplot as plt
File "/usr/lib64/python2.6/site-packages/matplotlib/pyplot.py", line 78, in <module>
new_figure_manager, draw_if_interactive, show = pylab_setup()
File "/usr/lib64/python2.6/site-packages/matplotlib/backends/__init__.py", line 25, in pylab_setup
globals(),locals(),[backend_name])
File "/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_gtkagg.py", line 10, in <module>
from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK, FigureCanvasGTK,\
File "/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_gtk.py", line 8, in <module>
import gtk; gdk = gtk.gdk
File "/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/__init__.py", line 64, in <module>
_init()
File "/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/__init__.py", line 52, in _init
_gtk.init_check()
RuntimeError: could not open display
感謝。
我不認爲這是一個連接問題,但聽起來似乎無法創建GTK顯示。你運行的是X11服務器,還是通過ssh運行它? –
我通過SSH運行這個。 我沒有使用'ssh -X'選項。 – user1816896