Qt 程序(Canopy GUI,ipython qtconsole)在 Enthought Canopy Win7 64 位中崩溃

Qt programs (Canopy GUI, ipython qtconsole) crash in Enthought Canopy Win7 64Bits

我在 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 qtconsoleipython qtconsole -pylab=qt 。但我仍然无法 运行 Canopy GUI(代码编辑器或包管理器)。

通常此错误意味着 PySide 无法找到 Qt DLL,或者它找到的版本不正确并且没有一些预期的符号。您的系统上是否在 PATH 某处有其他一些 Qt 库?您可以使用 Dependency Walker 工具检查 PySide *.pyd 文件以查看它正在搜索的其他 DLL 以及它加载的 DLL。