iPython/jupyter qtconsole fails to start in anaconda 2.4.0

不羁的心 提交于 2020-01-07 04:44:26

问题


After upgrading Anaconda3 (32-bit) from version 2.3.0 to 2.4.0 (by reinstalling Anaconda) on my Windows 7 64-bit machine, the iPython/jupyter qtconsole fails to start: when executing jupyter-qtconsole.exe or jupyter-qtconsole-script.py, the following error appears:

Traceback (most recent call last):
  File "C:\Anaconda3\Scripts\jupyter-qtconsole-script.py", line 1, in <module>
    from qtconsole.qtconsoleapp import main
  File "C:\Anaconda3\lib\site-packages\qtconsole\qtconsoleapp.py", line 45, in <module>
    from qtconsole.qt import QtCore, QtGui
  File "C:\Anaconda3\lib\site-packages\qtconsole\qt.py", line 23, in <module>
    QtCore, QtGui, QtSvg, QT_API = load_qt(api_opts)
  File "C:\Anaconda3\lib\site-packages\qtconsole\qt_loaders.py", line 285, in load_qt
    result = loaders[api]()
  File "C:\Anaconda3\lib\site-packages\qtconsole\qt_loaders.py", line 192, in import_pyqt4
    from PyQt4 import QtGui, QtCore, QtSvg
ImportError: DLL load failed: The specified procedure could not be found.

The qtconsole still works in an Anaconda 2.3.0 environment I created. After comparing the .\Lib\site-packages\PyQt4 directories of both the 2.3.0 and 2.4.0 environments, I noticed that the latter is missing all the Qt dll's and Qt directories. After a quick search, I discovered the Qt dll's are now located in C:\Anaconda3\Library\bin. This directory is also set in the system PATH environment variable, but the problem is still there. How to solve this issue?


回答1:


After copying QtCore4.dll and QtGui4.dll from C:\Anaconda3\Library\bin to .\Lib\site-packages\PyQt4, as suggested here, I got the qtconsole going again. However, this is not a very elegant solution.




回答2:


I have installed Anaconda_4.1.1.1 to resolve the issue. The 4.1.1.1 has a qt.conf file that configures Qt for windows. Adding this to help other users who are facing the same issue with latest Anaconda 4.3 version (though this post is a little old now)

Browse the below path for all the old anaconda versions:

https://repo.continuum.io/archive/



来源:https://stackoverflow.com/questions/34008610/ipython-jupyter-qtconsole-fails-to-start-in-anaconda-2-4-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!