spyder: Spyder fails to start on Linux with Qt 5.6 and Anaconda because of the lack of libselinux.so.1

Description of your problem

Spyder unable to load due to import error in Linux 64bit.

Edit: This issue also existed on previous version 3.0.0b5.

What steps will reproduce the problem?

  1. create new conda environment

conda create -n spyder python 2. Install spyder

conda install -c qttesting qt pyqt conda install -c spyder-ide spyder==3.0.0b6 3. Run spyder

spyder

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

Traceback (most recent call last):
  File "/home/idwaker/miniconda3/envs/spyder/lib/python3.5/site-packages/qtpy/QtWebEngineWidgets.py", line 22, in <module>
    from PyQt5.QtWebEngineWidgets import QWebEnginePage
ImportError: No module named 'PyQt5.QtWebEngineWidgets'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/idwaker/miniconda3/envs/spyder/bin/spyder", line 3, in <module>
    start.main()
  File "/home/idwaker/miniconda3/envs/spyder/lib/python3.5/site-packages/spyder/app/start.py", line 116, in main
    from spyder.app import mainwindow
  File "/home/idwaker/miniconda3/envs/spyder/lib/python3.5/site-packages/spyder/app/mainwindow.py", line 92, in <module>
    from qtpy import QtWebEngineWidgets  # analysis:ignore
  File "/home/idwaker/miniconda3/envs/spyder/lib/python3.5/site-packages/qtpy/QtWebEngineWidgets.py", line 26, in <module>
    from PyQt5.QtWebKitWidgets import QWebPage as QWebEnginePage
ImportError: libselinux.so.1: cannot open shared object file: No such file or directory

Please provide any additional information below

while using python 2, has same results

Traceback (most recent call last):
  File "/home/idwaker/miniconda3/envs/spyder-py2/bin/spyder", line 3, in <module>
    start.main()
  File "/home/idwaker/miniconda3/envs/spyder-py2/lib/python2.7/site-packages/spyder/app/start.py", line 116, in main
    from spyder.app import mainwindow
  File "/home/idwaker/miniconda3/envs/spyder-py2/lib/python2.7/site-packages/spyder/app/mainwindow.py", line 92, in <module>
    from qtpy import QtWebEngineWidgets  # analysis:ignore
  File "/home/idwaker/miniconda3/envs/spyder-py2/lib/python2.7/site-packages/qtpy/QtWebEngineWidgets.py", line 26, in <module>
    from PyQt5.QtWebKitWidgets import QWebPage as QWebEnginePage
ImportError: libselinux.so.1: cannot open shared object file: No such file or directory

Versions and main components

  • Spyder Version: 3.0.0b6
  • Python Version: 2.7 and 3.5
  • Operating system: Linux 64bit with Miniconda

Dependencies

output of conda list
# packages in environment at /home/idwaker/miniconda3/envs/spyder:
#
alabaster                 0.7.8                    py35_0  
astroid                   1.4.4                    py35_0  
babel                     2.3.3                    py35_0  
cairo                     1.12.18                       6  
decorator                 4.0.10                   py35_0  
docutils                  0.12                     py35_2  
entrypoints               0.2.2                    py35_0  
expat                     2.1.0                         0  
fontconfig                2.11.1                        6  
freetype                  2.5.5                         1  
glib                      2.43.0                        1  
harfbuzz                  0.9.39                        1  
icu                       54.1                          0  
imagesize                 0.7.1                    py35_0  
ipykernel                 4.4.1                    py35_0  
ipython                   5.1.0                    py35_0  
ipython_genutils          0.1.0                    py35_0  
jedi                      0.9.0                    py35_1  
jinja2                    2.8                      py35_1  
jpeg                      8d                            1  
jsonschema                2.5.1                    py35_0  
jupyter_client            4.3.0                    py35_0  
jupyter_core              4.1.1                    py35_0  
lazy-object-proxy         1.2.1                    py35_0  
libffi                    3.2.1                         0  
libgcc                    5.2.0                         0  
libpng                    1.6.22                        0  
libsodium                 1.0.10                        0  
libxml2                   2.9.2                         0  
logilab-common            1.0.2                    py35_0  
markupsafe                0.23                     py35_2  
mistune                   0.7.2                    py35_0  
nbconvert                 4.2.0                    py35_0  
nbformat                  4.0.1                    py35_0  
openssl                   1.0.2h                        1  
pango                     1.39.0                        1  
path.py                   8.2.1                    py35_0  
pep8                      1.7.0                    py35_0  
pexpect                   4.0.1                    py35_0  
pickleshare               0.7.3                    py35_0  
pip                       8.1.2                    py35_0  
pixman                    0.32.6                        0  
prompt_toolkit            1.0.3                    py35_0  
psutil                    4.3.0                    py35_0  
ptyprocess                0.5.1                    py35_0  
pyflakes                  1.2.3                    py35_0  
pygments                  2.1.3                    py35_0  
pylint                    1.5.4                    py35_0  
python                    3.5.2                         0  
pytz                      2016.6.1                 py35_0  
pyzmq                     15.4.0                   py35_0  
qtawesome                 0.3.3                    py35_0  
qtconsole                 4.2.1                    py35_0  
dbus                      1.11.2                        3    qttesting
gst-plugins-base          1.8.0                         0    qttesting
gstreamer                 1.8.0                         0    qttesting
libxcb                    1.11.1                        0    qttesting
pyqt                      5.6.0                    py35_0    qttesting
qt                        5.6.0                         0    qttesting
readline                  6.2                           2  
rope                      0.9.4                    py35_1  
setuptools                25.1.6                   py35_0  
simplegeneric             0.8.1                    py35_1  
six                       1.10.0                   py35_0  
snowballstemmer           1.2.1                    py35_0  
sphinx                    1.4.1                    py35_0  
sphinx_rtd_theme          0.1.9                    py35_0  
qtpy                      1.1.1                      py_0    spyder-ide
sip                       4.18                     py35_0    spyder-ide
spyder                    3.0.0b6                  py35_1    spyder-ide
sqlite                    3.13.0                        0  
tk                        8.5.18                        0  
tornado                   4.4.1                    py35_0  
traitlets                 4.2.2                    py35_0  
wcwidth                   0.1.7                    py35_0  
wheel                     0.29.0                   py35_0  
wrapt                     1.10.6                   py35_0  
xz                        5.2.2                         0  
zeromq                    4.1.4                         0  
zlib                      1.2.8                         3  

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 22 (9 by maintainers)

Most upvoted comments

This bit me this AM on Arch Linux, and I wanted to make a note for Arch users that while selinux 1 is not available on arch, installing selinux 2.5 from the Arch User Repository appears to resolve the issue (in other words it boots up but I haven’t used it extensively yet).

Thanks for reporting. This error happens because libQt5WebKit.so depends on libselinux.so.1 and you don’t have it installed in your system (that library is not provided by Anaconda).

I don’t know what Linux distro you’re using, but in Ubuntu you can run

sudo apt-get install libselinux1

to install it.


@mingwandroid, why Webkit ends up compiled against selinux? I checked other Qt libraries (e.g. QtWidgets) and they don’t have that dependency 😃

@ethankruse, this problem is caused by an update in qtpy. We’re working to fix it right now 😃