question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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  

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:22 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
MarkCWirtcommented, Oct 3, 2016

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).

3reactions
ccordoba12commented, Aug 31, 2016

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 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Anaconda Spyder Qt library error on launch - Stack Overflow
I use anaconda 1.8 on kubuntu alpha. It uses qt 4.8.5. I can see it with find $ANACONDA/lib -name '*.4.8.5'. My system qt...
Read more >
spyder-ide/public - Gitter
I installed Anaconda is now lacking what to do.. Pythonw: "This application failed to start because it could not find or load the...
Read more >
main - Anaconda repo
Package Latest Version Doc Dev License linux‑64 osx‑64 win‑64 7za 920 doc LGPL X 7zip 19.00 dev LGPL‑2.1‑or‑later X _anaconda_depends 2022.05 doc dev BSD X X...
Read more >
Installation — Spyder 3 documentation
Spyder is relatively easy to install on Windows, Linux and macOS. Just make sure to read and follow these instructions with care. This...
Read more >
Untitled
This works around the fact that systemd starts opensm so early that we ... oxygen-gtk3-1.1.1 - workaround anaconda main menu not visible in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found