我在Windows 7 - 64位上安装了Canopy 1.5.2。我执行了Enthought web page中描述的所有步骤,但Canopy GUI无法启动。我意识到这个问题与Qt有关,因为不需要这些程序的应用程序(如Mayavi,Pylab等)可以很好地工作。当我试着跑,p.e。 ipython qtconsole
,控制台上显示以下内容:
D:\Enthought\Canopy\User\Scripts>ipython qtconsole
Error in sys.excepthook:
Traceback (most recent call last):
File "D:\Enthought\Canopy\User\lib\site-packages\IPython\qt\console\qtconsolea
pp.py", line 45, in gui_excepthook
old_excepthook(exctype, value, tb)
TypeError: 'NoneType' object is not callable
Original exception was:
Traceback (most recent call last):
File "C:\Program Files\Enthought\Canopy\App\appdata\canopy-1.5.2.2785.win-x86_
64\lib\runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Program Files\Enthought\Canopy\App\appdata\canopy-1.5.2.2785.win-x86_
64\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "D:\Enthought\Canopy\User\lib\site-packages\IPython\__main__.py", line 14
, in <module>
start_ipython()
File "D:\Enthought\Canopy\User\lib\site-packages\IPython\__init__.py", line 12
0, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File "D:\Enthought\Canopy\User\lib\site-packages\IPython\config\application.py
", line 573, in launch_instance
app.initialize(argv)
File "<string>", line 2, in initialize
File "D:\Enthought\Canopy\User\lib\site-packages\IPython\config\application.py
", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "D:\Enthought\Canopy\User\lib\site-packages\IPython\terminal\ipapp.py", l
ine 321, in initialize
super(TerminalIPythonApp, self).initialize(argv)
File "<string>", line 2, in initialize
File "D:\Enthought\Canopy\User\lib\site-packages\IPython\config\application.py
", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "D:\Enthought\Canopy\User\lib\site-packages\IPython\core\application.py",
line 369, in initialize
self.parse_command_line(argv)
File "D:\Enthought\Canopy\User\lib\site-packages\IPython\terminal\ipapp.py", l
ine 316, in parse_command_line
return super(TerminalIPythonApp, self).parse_command_line(argv)
File "<string>", line 2, in parse_command_line
File "D:\Enthought\Canopy\User\lib\site-packages\IPython\config\application.py
", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "D:\Enthought\Canopy\User\lib\site-packages\IPython\config\application.py
", line 471, in parse_command_line
return self.initialize_subcommand(subc, subargv)
File "<string>", line 2, in initialize_subcommand
File "D:\Enthought\Canopy\User\lib\site-packages\IPython\config\application.py
", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "D:\Enthought\Canopy\User\lib\site-packages\IPython\config\application.py
", line 402, in initialize_subcommand
subapp = import_item(subapp)
File "D:\Enthought\Canopy\User\lib\site-packages\IPython\utils\importstring.py
", line 42, in import_item
module = __import__(package, fromlist=[obj])
File "D:\Enthought\Canopy\User\lib\site-packages\IPython\qt\console\qtconsolea
pp.py", line 50, in <module>
from IPython.external.qt import QtCore, QtGui
File "D:\Enthought\Canopy\User\lib\site-packages\IPython\external\qt.py", line
23, in <module>
QtCore, QtGui, QtSvg, QT_API = load_qt(api_opts)
File "D:\Enthought\Canopy\User\lib\site-packages\IPython\external\qt_loaders.p
y", line 277, in load_qt
result = loaders[api]()
File "D:\Enthought\Canopy\User\lib\site-packages\IPython\external\qt_loaders.p
y", line 229, in import_pyside
from PySide import QtGui, QtCore, QtSvg
ImportError: DLL load failed: No se puede encontrar el m¾dulo especificado.
D:\Enthought\Canopy\User\Scripts>
,但是当我开始ipython notebook
时一切正常。我还使用enpkg
更新了所有包。我感谢任何帮助。提前谢谢。
更新:我设置了set QT_API = pyqt
,现在我可以运行ipython qtconsole
和ipython qtconsole -pylab=qt
了。但我仍然无法运行Canopy GUI(代码编辑器或包管理器)。
答案 0 :(得分:1)
通常这个错误意味着PySide无法找到Qt DLL,或者它找到的那些不是正确的版本而且没有一些预期的符号。在PATH的某个地方,你的系统上还有其他一套Qt库吗?您可以使用Dependency Walker工具检查PySide * .pyd文件,以查看它正在搜索的其他DLL及其加载的DLL。