我正在使用 IPython 0.13.2,我想在 QT 控制台上试用 IPython。但是,在 PySide 上执行 easy_install 后,它安装了 1.2.0 版。做 ipython qtconsole 仍然给出同样的错误:
File "c:\python27\lib\site-packages\IPython\config\application.py", line 352, in initialize_subcommand
subapp = import_item(subapp)
File "c:\python27\lib\site-packages\IPython\utils\importstring.py", line 40, in import_item
module = __import__(package,fromlist=[obj])
File "c:\python27\lib\site-packages\IPython\frontend\qt\console\qtconsoleapp.py", line 56, in <module>
from IPython.external.qt import QtCore, QtGui
File "c:\python27\lib\site-packages\IPython\external\qt.py", line 57, in <module>
raise ImportError('Cannot import PySide >= 1.0.3 or PyQt4 >= 4.7')
ImportError: Cannot import PySide >= 1.0.3 or PyQt4 >= 4.7
但是,当我启动 IPython 并尝试导入 PySide 时,它看起来很好:
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)]
Type "copyright", "credits" or "license" for more information.
IPython 0.13.2 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: import PySide
In [2]: PySide.__version__
Out[2]: '1.2.0'
In [3]:
是什么赋予了?我在 Windows XP 上,使用 Console2(在 IPython 网站上推荐),但也尝试命令提示符,结果相同。