Michele Ancis
Michele Ancis

Reputation: 1343

Anaconda3-4.3.1 installation on Linux - Spyder won't launch (PyQt5.QtWebEngineWidgets)

I just installed the above mentioned Anaconda version. Jupyter works fine, but I can't launch Spyder as I get

 File "/proj/mianxx/anaconda3/lib/python3.6/site-packages/qtpy/QtWebEngineWidgets.py", line 22, in <module>
    from PyQt5.QtWebEngineWidgets import QWebEnginePage
ModuleNotFoundError: No module named 'PyQt5.QtWebEngineWidgets'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/proj/mianxx/anaconda3/bin//spyder", line 6, in <module>
    sys.exit(spyder.app.start.main())
  File "/proj/mianxx/anaconda3/lib/python3.6/site-packages/spyder/app/start.py", line 103, in main
    from spyder.app import mainwindow
  File "/proj/mianxx/anaconda3/lib/python3.6/site-packages/spyder/app/mainwindow.py", line 92, in <module>
    from qtpy import QtWebEngineWidgets  # analysis:ignore
  File "/proj/mianxx/anaconda3/lib/python3.6/site-packages/qtpy/QtWebEngineWidgets.py", line 26, in <module>
    from PyQt5.QtWebKitWidgets import QWebPage as QWebEnginePage
ImportError: /proj/mianxx/anaconda3/lib/python3.6/site-packages/PyQt5/../../../././libgsttag-1.0.so.0: undefined symbol: g_mutex_init

I am too much of a noob to take it from here...Any hints?

I've checked This GIT entry but I can't make much of it. It also seems old, despite being open.

EDIT

The issue appears to be related to tcsh, which is the default shell called. If one issues

bash
LD_LIBRARY_PATH= spyder

This works and launches spyder correctly. However,

bash
spyder

will generate the same error as above. Thanks to @Carlos Cordoba for his help.

Upvotes: 0

Views: 2099

Answers (3)

AbdL_G
AbdL_G

Reputation: 11

I found the answer (work with Ubuntu 18.04)

Check the version of pyqt conda list pyqt if it is 5.6.x

It won't work so I resorted to this simple command:

conda install pyqt=5.9.2 

(and later also to qt=5.9.5 qtpy=1.4.1 check all with conda list qt)

then you're good to launch spyder

Upvotes: 1

Thibault Langlois
Thibault Langlois

Reputation: 99

More info on lixun's answer. In fact you may do

$ export LD_LIBRARY_PATH=
$ spyder

and it will work without any warning. Seasoned spyder/qt/anaconda specialists may be able to explain why. I do not feel this is a good solution. It is just a workaround.

I am using anaconda on Ubuntu 16.04.

Upvotes: 0

lixun
lixun

Reputation: 45

Thanks for Carlos Cordoba's help, When I try to use:

LD_LIBRARY_PATH= spyder

in terminal, it really works but 'spyder' can't. Then I use:

sudo gedit ~/.bashrc

to open bashrc, write

export LD_LIBRARY_PATH= spyder:$LD_LIBRARY_PATH

save and open terminal with:

source ~/.bashrc

retry enter:

spyder

in terminal, works!


UPDATE

There is still something wrong when I write LD_LIBRARY_PATH= spyder in bashrc, every time when I open terminal, there is an error shows that space shouldn't write before spyder, but when I alter LD_LIBRARY_PATH= spyder into LD_LIBRARY_PATH=spyder, Spyder won't launch again, So there are two ways can solve this problem:

  1. Don't mind see warning every time you open terminal
  2. Use LD_LIBRARY_PATH= spyder open spyder

Upvotes: 2

Related Questions