spyder3 crash: "Selected binding "pyqt5" could not be found"

Bug #1793352 reported by G.M.
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pkg-website
Invalid
Undecided
Unassigned

Bug Description

Hi,

I am under Ubuntu 18.04.1 LTS. A few weeks ago, I installed python3 & spyder3 to learn Python. FYI, I already had Python2.7 installed as dependency of several other packages on my machine.

If I recall correctly, at that time I managed to at least start spyder3. But I dist-upgraded my box a few days ago, and now running Spyder3 gets me the following fatal error (no window appearing):

[09/18/18-15:11:08] gmuller@X751LAB:~$ spyder3
/usr/local/lib/python3.6/dist-packages/qtpy/__init__.py:211: RuntimeWarning: Selected binding "pyqt5" could not be found, using "pyqt"
  'using "{}"'.format(initial_api, API), RuntimeWarning)
Traceback (most recent call last):
  File "/usr/local/bin/spyder3", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/dist-packages/spyder/app/start.py", line 178, in main
    from spyder.app import mainwindow
  File "/usr/local/lib/python3.6/dist-packages/spyder/app/mainwindow.py", line 50, in <module>
    requirements.check_qt()
  File "/usr/local/lib/python3.6/dist-packages/spyder/requirements.py", line 42, in check_qt
    package_name, required_ver = qt_infos[qtpy.API]
KeyError: 'pyqt'

Using apt-get I installed the package named python3-pyqt5, but it did not solve the problem.

Thus I tried with pip, but it got me another error:
[09/18/18-15:11:08] gmuller@X751LAB:~$ spyder3
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/qtpy/QtWebEngineWidgets.py", line 22, in <module>
    from PyQt5.QtWebEngineWidgets import QWebEnginePage
ImportError: /home/gmuller/.local/lib/python3.6/site-packages/PyQt5/Qt/lib/libQt5WebEngineWidgets.so.5: symbol _ZN12QQuickWidget18focusNextPrevChildEb version Qt_5 not defined in file libQt5QuickWidgets.so.5 with link time reference

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/spyder3", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/dist-packages/spyder/app/start.py", line 178, in main
    from spyder.app import mainwindow
  File "/usr/local/lib/python3.6/dist-packages/spyder/app/mainwindow.py", line 92, in <module>
    from qtpy import QtWebEngineWidgets # analysis:ignore
  File "/usr/local/lib/python3.6/dist-packages/qtpy/QtWebEngineWidgets.py", line 26, in <module>
    from PyQt5.QtWebKitWidgets import QWebPage as QWebEnginePage
ModuleNotFoundError: No module named 'PyQt5.QtWebKitWidgets'

I tried to install python3-pyqt5.qtwebkit and libqt5webkit5-dev but it did not solve the problem.

I removed all my packages installed through pip(3) and reinstalled them through apt. No more luck...

Then, I found the following thread: https://stackoverflow.com/questions/37876987/cannot-import-qtwebkitwidgets-in-pyqt5
The deprecation of qtwebkit would explain my problems... The spyder3 version I have seems to be expecting an earlier version of Qt5 than the one I have...
As I took all my packages from the official repositories, this means there is a dependency problem in the Ubuntu/Debian packages as qt5 and spyder3 versions are not in sync... If spyder3 has been updated and "knows how to use" the latest Qt5, it would be great to provide this later version as a package in the offical Deb/Ubuntu repositories. If it is not, it would be great to stick to a previous Qt5 version in the packages, or, if several versions can be maintained together, to create a dependency between spyder3 and an earlier version of qt5...

Another 2 cents ideas: why not provide "dummy" packages "python3-xxx" that would simply call 'python3 -m pip install "xxx"' so that the final user is not stuck into a mess of pip vs. apt versions to manage manually?

Thanks

LIAR

G.M. (sexxxenator)
description: updated
summary: - spyder3 "Selected binding "pyqt5" could not be found"
+ spyder3 crash: "Selected binding "pyqt5" could not be found"
Revision history for this message
Rhonda D'Vine (rhonda) wrote :

This is not a website bug. Please file the bugreport with the correct package that you have issues with.

Thanks for understanding,
Rhonda

Changed in pkg-website:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.