2013-07-24 131 views
1

我正在使用IPython 0.13.2,我想在QT控制檯上嘗試IPython。但是,在PySide上執行easy_install之後,它安裝了1.2.0版本。這樣做IPython的qtconsole仍然給出了同樣的錯誤:ipython無法識別已安裝的PySide?

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網站上推薦),但也嘗試命令提示符,結果相同。

回答

0

發現了問題:

我需要先升級在Python 2.7.3到Python 2.7.5自PySide 1.2與2.7.5建立。

之後,我只需要在pygments上做easy_install 然後ipython qtconsole工作的很好!

相關問題