spyder: spyder 3.1.4 fails to load due to missing PyQt5.QtWebKitWidgets

I have just updated through conda to the latest spyder 3.1.4, and received the latest failure:

(uvcdat280nox) duro@ocean:[160202_PaperPlots_SaltyVariability]:[5365]> Traceback (most recent call last):
  File "/export/duro/anaconda2/envs/uvcdat280nox/bin/spyder", line 6, in <module>
    sys.exit(spyder.app.start.main())
  File "/export/duro/anaconda2/envs/uvcdat280nox/lib/python2.7/site-packages/spyder/app/start.py", line 103, in main
    from spyder.app import mainwindow
  File "/export/duro/anaconda2/envs/uvcdat280nox/lib/python2.7/site-packages/spyder/app/mainwindow.py", line 92, in <module>
    from qtpy import QtWebEngineWidgets  # analysis:ignore
  File "/export/duro/anaconda2/envs/uvcdat280nox/lib/python2.7/site-packages/qtpy/QtWebEngineWidgets.py", line 26, in <module>
    from PyQt5.QtWebKitWidgets import QWebPage as QWebEnginePage
ImportError: No module named QtWebKitWidgets

It seems that PyQt5 is installed:

(uvcdat280nox) duro@ocean:[160202_PaperPlots_SaltyVariability]:[5365]> ipython
Python 2.7.13 | packaged by conda-forge | (default, Mar 20 2017, 14:04:17)           
Type "copyright", "credits" or "license" for more information.                       
IPython 5.3.0 -- 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 PyQt5
In [2]: dir(PyQt5)
Out[2]: ['__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__']

Is there a badly defined dependency in the conda release, or a deprecation that has crept in? The # analysis:ignore comment above triggered this question

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 25 (11 by maintainers)

Most upvoted comments

pyqt: 5.6.0-py27_0 conda-forge --> 5.6.0-py27_2

Conda forge packages are still a bit experimental. However, they should have support now for WebKitWidgets (as https://github.com/conda-forge/pyqt-feedstock/pull/23 proves). So a simple

conda update qt pyqt -c conda-forge

should fix this problem.

I found anaconda or whatever python packages are badly maintained …

@CAM-Gerlach Thank you. After trying what you suggested and many others, I ended up solving this by: conda install -c defaults pyqt=5 qt Before, I think I was using either conda-forge or spyder-ide. Now Spyder 3.3.1 works with Python 3.5 at least (I haven’t tried it on Python 2.7 yet.) Following is the full output.

$ conda install -c defaults pyqt=5 qt
Solving environment: done

## Package Plan ##

  environment location: ~/anaconda/envs/python3

  added / updated specs: 
    - pyqt=5
    - qt


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    pcre-8.42                  |       h378b8a2_0         224 KB
    dbus-1.13.2                |       h760590f_1         540 KB
    certifi-2018.8.24          |           py35_1         139 KB
    glib-2.56.2                |       hd9629dc_0         4.7 MB
    qt-5.9.6                   |       h45cd832_2        78.1 MB
    openssl-1.0.2p             |       h1de35cc_0         3.4 MB
    sip-4.19.8                 |   py35h0a44026_0         253 KB
    libiconv-1.15              |       hdd342a3_7         1.3 MB
    gettext-0.19.8.1           |       h15daf44_3         3.4 MB
    ca-certificates-2018.03.07 |                0         124 KB
    pyqt-5.9.2                 |   py35h655552a_2         4.4 MB
    ------------------------------------------------------------
                                           Total:        96.6 MB

The following NEW packages will be INSTALLED:

    dbus:            1.13.2-h760590f_1                
    gettext:         0.19.8.1-h15daf44_3              
    glib:            2.56.2-hd9629dc_0                
    libiconv:        1.15-hdd342a3_7                  
    pcre:            8.42-h378b8a2_0                  

The following packages will be UPDATED:

    pyqt:            5.6.0-py35h8210e8a_7  conda-forge --> 5.9.2-py35h655552a_2 
    qt:              5.6.2-hd4c90f3_9      conda-forge --> 5.9.6-h45cd832_2     
    sip:             4.18.1-py35hfc679d8_0 conda-forge --> 4.19.8-py35h0a44026_0

The following packages will be DOWNGRADED:

    ca-certificates: 2018.10.15-ha4d7672_0 conda-forge --> 2018.03.07-0         
    certifi:         2018.8.24-py35_1001   conda-forge --> 2018.8.24-py35_1     
    openssl:         1.0.2p-h470a237_1     conda-forge --> 1.0.2p-h1de35cc_0

@ccordoba12 thanks, I can confirm that

conda update -c conda-forge qt pyqt
Fetching package metadata ...........
Solving package specifications: .
Package plan for installation in environment /export/duro/anaconda2/envs/uvcdat280nox:
The following packages will be UPDATED:
    qt:   5.6.2-1      conda-forge --> 5.6.2-2      conda-forge
The following packages will be SUPERSEDED by a higher-priority channel:
    pyqt: 5.6.0-py27_2             --> 5.6.0-py27_2 conda-forge

Works for me