Spyder: Spyder for Python3 won't open on Ubuntu 18.04

Created on 22 May 2018  路  4Comments  路  Source: spyder-ide/spyder

Problem Description

Spyder for Python version 3.6 not running in Ubuntu 18.04. No matter if installed from Ubuntu's Multiverse or through pip3.

What steps reproduce the problem?

  1. Install pip3 on Ubuntu 18.04.
  2. Install Python 3 through pip3.
  3. Install SciPy libraries using pip3.
  4. Install Spyder using pip3. It says it was installed successfully.
  5. Try running Spyder and get:
    bash: /usr/bin/spyder3: File or path not found
    Installation also not found anywhere after manual search.
  6. Uninstall Spyder 3 through pip3.
  7. Remove the dead link pointing to the wrong location by running hash -d spyder3
  8. Run sudo apt install spyder3
  9. Run spyder3

What is the expected output? What do you see instead?

It was expected to open Spyder 3. The program does not open and the following lines show up:

/usr/local/lib/python3.6/dist-packages/qtpy/__init__.py:181: RuntimeWarning: Selected binding "pyqt5" could not be found, using "pyqt"
  'using "{}"'.format(initial_api, API), RuntimeWarning)
Traceback (most recent call last):
  File "/usr/bin/spyder3", line 11, in <module>
    load_entry_point('spyder==3.2.6', 'gui_scripts', 'spyder3')()
  File "/usr/lib/python3/dist-packages/spyder/app/start.py", line 143, in main
    from spyder.app import mainwindow
  File "/usr/lib/python3/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 43, in <module>
    from PyQt4.QtWebKit import QWebPage as QWebEnginePage
ModuleNotFoundError: No module named 'PyQt4.QtWebKit'


Apparently pip3 does not install PyQt4, but only PyQt5, since it's an obsolete version, as suggested by this older thread:
https://github.com/spyder-ide/spyder/issues/3200
So I suppose Spyder should use PyQt5 instead since it's the version included in pip3.

Versions

  • Spyder version: 3.2.8
  • Python version: 3.6.5
  • Qt version: not manually installed
  • PyQt version: PyQt5 (5.9.2), according to pip3 list
  • Operating System name/version: Ubuntu 18.04
Invalid

Most helpful comment

@crimagit, you need to update Spyder with

conda update spyder

to fix this.

All 4 comments

Please read our

https://github.com/spyder-ide/spyder/wiki/Troubleshooting-Guide-and-FAQ

If you are unable to fix the problem after that, please install Anaconda instead. Unfortunately, we don't have the resources nor the time to help people with custom installations, so it's up to you to figure this one out.

This is because custom installations are for experts or very knowledgeable people who really know what they are doing and are able to easily solve problems like this.

in conda does not work either.
Violaci贸n de segmento (core generado)

@crimagit, you need to update Spyder with

conda update spyder

to fix this.

The same error displayed when I first installed and tried to run spyder but now it is fixed on ubuntu 18.04-

  • Install spyder 3 using command
    sudo apt install spyder3
    it installs the spyder 3 and now on running spyder3 from terminal it starts
Was this page helpful?
0 / 5 - 0 ratings