设置:
处理器:x86_64
操作系统:GNU/Linux
发行版:Fedora Release 13 (Goddard).
Python 2.6.4
/usr/bin/python
这是以下问题:
我正在尝试使用 Matplotlib 和 Python 生成一些图表。正如我从大多数解决方案3中听到的那样,matplotlib 和 64 位架构之间似乎存在兼容性问题。
这是我得到的错误:
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
谢谢。