简体   繁体   中英

iPython/jupyter qtconsole fails to start in anaconda 2.4.0

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?

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.

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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM