我在虚拟环境(1.13 和 2.7.2)中安装了 ipython 并尝试ipython -gui=gtk
了但仍然获得了基本的终端界面,例如没有 %paste 支持。
现在我尝试安装 pygtk 但也没有成功。
我正在使用 OpenBox WM 运行 Crunchbang linux。
[TerminalIPythonApp] GUI event loop or pylab initialization failed
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
...python2.7/local/lib/python2.7/site-packages/IPython/lib/inputhook.pyc in enable_gui(gui, app)
526 e = "Invalid GUI request %r, valid ones are:%s" % (gui, guis.keys())
527 raise ValueError(e)
--> 528 return gui_hook(app)
529
...python2.7/local/lib/python2.7/site-packages/IPython/lib/inputhook.pyc in enable_gtk(self, app)
286 IPython.
287 """
--> 288 import gtk
289 try:
290 gtk.set_interactive(True)
ImportError: No module named gtk
我试图在我激活的 virtualenv 中 pip install pygtk 但没有运气。
完整日志:
$ pip install pygtk
Downloading/unpacking pygtk
Downloading pygtk-2.24.0.tar.bz2 (2.4MB): 2.4MB downloaded
Running setup.py egg_info for package pygtk
********************************************************************
* Building PyGTK using distutils is only supported on windows. *
* To build PyGTK in a supported way, read the INSTALL file. *
********************************************************************
Complete output from command python setup.py egg_info:
********************************************************************
* Building PyGTK using distutils is only supported on windows. *
* To build PyGTK in a supported way, read the INSTALL file. *
********************************************************************
----------------------------------------
Command python setup.py egg_info failed with error code 1 in ...python2.7/build/pygtk