[Python] Issue opening Spyder IDE in WSL Ubuntu

Discussão em 'Python' iniciado por Stack, Junho 9, 2025.

  1. Stack

    Stack Membro Participativo

    I'm Using a completely fresh install of Ubuntu 24.04.1 LTS through windows subsystem for Linux which is the latest version I saw available on the Microsoft Store. I just created my account and installed Anaconda version 24.5.0 from the repo of older versions because I figured an older version might be more stable or compatible with my version of Ubuntu. Jupyter Lab seems to work just fine, but when I attempted to open spyder, I got the following:

    (base) william@DESKTOP-OPQKL6J:~$ spyder
    Traceback (most recent call last):
    File "/home/william/anaconda3/bin/spyder", line 11, in <module>
    sys.exit(main())
    ^^^^^^
    File "/home/william/anaconda3/lib/python3.12/site-packages/spyder/app/start.py", line 252, in main
    from spyder.app import mainwindow
    File "/home/william/anaconda3/lib/python3.12/site-packages/spyder/app/mainwindow.py", line 57, in <module>
    from qtpy import QtWebEngineWidgets # analysis:ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/william/anaconda3/lib/python3.12/site-packages/qtpy/QtWebEngineWidgets.py", line 28, in <module>
    from PyQt5.QtWebEngineWidgets import (
    ImportError: libpci.so.3: cannot open shared object file: No such file or directory


    Out of curiosity, I did try to remedy this by installing libpci (after updating the package list) and the package couldn't be found:

    (base) william@DESKTOP-OPQKL6J:~$ sudo apt install libpci
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    E: Unable to locate package libpci


    I actually ran into a similar issue several years back and I definitely recall seeing pyqt and the widget in the error message back then too. I was on an older version of Ubuntu when I needed to use a Python package that could only be accessed via Linux and WSL, and while I did end up getting it to work back then, I just don't remember exactly how. I think the issue was that the version of Ubuntu was incompatible with one of the dependencies that Spyder needed from the latest Anaconda release at the time, so I had to play around with versions until it worked, but I honestly don't remember. Can anyone here verify if that's the cause of this issue, and if so, what versions of both Ubuntu and Anaconda will let me use Spyder?

    Continue reading...

Compartilhe esta Página