You are not logged in.

#1 2023-08-16 08:06:29

mtubarch
Member
From: Italy
Registered: 2023-02-16
Posts: 46

[SOLVED] Available system-level packages not working in Spyder

Hi everyone. I installed Spyder 5.4.4-1 from the repos. Opening it I get this message:

«You have missing dependencies!
# Mandatory:
pylint_venv >=3.0.2 : 3.0.1 (NOK)
pylsp >=1.7.4,<1.8.0 : 1.7.2 (NOK)
spyder_kernels >=2.4.4,<2.5.0 : 2.4.3 (NOK)»

Pacman doesn't tell me about any missing dependencies so I ignored this message.

I started working without activating a virtual environment because I wanted to use only available system-level packages, among which matplotlib.

The command

import matplotlib.pyplot as plt

produces this error:

ModuleNotFoundError: No module named 'matplotlib'

The error is reported even if I change the working directory.
I've used the same command in iPython 8.14.0 (activated through the terminal, without Spyder) and in the latter case it works and I don't get any errors.

What am I doing wrong? Thanks a lot in advance!

Last edited by mtubarch (2023-08-19 13:28:43)

Offline

#2 2023-08-16 11:20:29

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,202

Re: [SOLVED] Available system-level packages not working in Spyder

Those 3 'missing deps' are present, but in older versions then what is expected.

I installed spyder and started it from cli, no messages. However when I goto help > dependencies I do see the same 3 reports.
Is matplotlib detected by spyder under optional in that dependencies screen ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2023-08-16 14:05:56

mtubarch
Member
From: Italy
Registered: 2023-02-16
Posts: 46

Re: [SOLVED] Available system-level packages not working in Spyder

No, matplotlib is not detected under optional in the dependencies screen (I found "sympy" as an another missing optional dependency, however no problem).

Offline

#4 2023-08-17 07:04:11

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,202

Re: [SOLVED] Available system-level packages not working in Spyder

python-lsp-server & python-spyder-kernels were already flagged out of date. I checked python-pylint-venv, found 3.0.2 was released and flagged it also.

Please post the output of

$ pacman -Qi spyder
$ pacman -Qikk python-mathplotlib

Last edited by Lone_Wolf (2023-08-17 07:05:17)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#5 2023-08-17 08:16:41

mtubarch
Member
From: Italy
Registered: 2023-02-16
Posts: 46

Re: [SOLVED] Available system-level packages not working in Spyder

Name            : spyder
Version         : 5.4.4-1
Description     : The Scientific Python Development Environment
Architecture    : any
URL             : https://www.spyder-ide.org/
Licenses        : MIT
Groups          : None
Provides        : None
Depends On      : python-atomicwrites  python-chardet  python-cloudpickle  python-cookiecutter  python-diff-match-patch  python-intervaltree
                  ipython  python-jedi  python-jellyfish  python-jsonschema  python-keyring  jupyter-nbconvert  python-numpydoc
                  python-parso  python-pexpect  python-pickleshare  python-psutil  python-pygments  python-pylint  python-pylint-venv
                  python-pyqt5  python-pyqt5-webengine  python-lsp-server  python-lsp-black  python-pyls-spyder  python-pyxdg  python-pyzmq
                  python-qdarkstyle  python-qstylizer  python-qtawesome  python-qtconsole  python-qtpy  python-rtree  python-setuptools
                  python-sphinx  python-spyder-kernels  python-textdistance  python-three-merge  python-watchdog  autopep8  flake8
                  python-pycodestyle  python-pydocstyle  python-pyflakes  python-rope  yapf  python-whatthepatch
Optional Deps   : cython: run Cython files in the IPython Console [installed]
                  python-matplotlib: 2D/3D plotting in the IPython Console [installed]
                  python-numpy: support for N-dimensional arrays in the Variable Explorer [installed]
                  python-pandas: support for DataFrames and Series in the Variable Explorer [installed]
                  python-scipy: support for Matlab workspace in the Variable Explorer [installed]
                  python-sympy: symbolic mathematics in the IPython Console
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 50.80 MiB
Packager        : Antonio Rojas <arojas@archlinux.org>
Build Date      : Mon 07 Aug 2023 07:10:01 PM CEST
Install Date    : Fri 11 Aug 2023 05:22:57 PM CEST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

Name            : python-matplotlib
Version         : 3.7.2-1
Description     : A python plotting library, making publication quality plots
Architecture    : x86_64
URL             : https://matplotlib.org
Licenses        : custom
Groups          : None
Provides        : None
Depends On      : freetype2  python-contourpy  python-cycler  python-dateutil  python-fonttools  python-kiwisolver  python-numpy
                  python-packaging  python-pillow  python-pyparsing  qhull
Optional Deps   : tk: Tk{Agg,Cairo} backends
                  pyside2: alternative for Qt5{Agg,Cairo} backends
                  pyside6: alternative for Qt6{Agg,Cairo} backends
                  python-pyqt5: Qt5{Agg,Cairo} backends [installed]
                  python-pyqt6: Qt6{Agg,Cairo} backends
                  python-gobject: for GTK{3,4}{Agg,Cairo} backend [installed]
                  python-wxpython: WX{Agg,Cairo} backend
                  python-cairo: {GTK{3,4},Qt{5,6},Tk,WX}Cairo backends [installed]
                  python-cairocffi: alternative for Cairo backends
                  python-tornado: WebAgg backend [installed]
                  ffmpeg: for saving movies [installed]
                  imagemagick: for saving animated gifs [installed]
                  ghostscript: usetex dependencies [installed]
                  texlive-binextra: usetex dependencies
                  texlive-fontsrecommended: usetex dependencies
                  texlive-latexrecommended: usetex usage with pdflatex
                  python-certifi: https support [installed]
Required By     : python-spyder-kernels
Optional For    : python-contourpy  python-fonttools  python-matplotlib-inline  python-pandas  python-scikit-learn  python-statsmodels
                  spyder  vtk
Conflicts With  : None
Replaces        : None
Installed Size  : 27.21 MiB
Packager        : Antonio Rojas <arojas@archlinux.org>
Build Date      : Sun 16 Jul 2023 02:25:15 PM CEST
Install Date    : Fri 21 Jul 2023 03:44:26 PM CEST
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature

python-matplotlib: 855 total files, 0 altered files

Offline

#6 2023-08-18 08:57:36

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,202

Re: [SOLVED] Available system-level packages not working in Spyder

The 3 to old deps should get solved when maintainers update the packages, it just will take time.

pacman python-spyder and python-matplotlib output looks fine.
Try creating a fresh test user and verify if spyder does detect matplotlib for that user.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#7 2023-08-18 11:27:56

mtubarch
Member
From: Italy
Registered: 2023-02-16
Posts: 46

Re: [SOLVED] Available system-level packages not working in Spyder

I created the fresh test user: spyder detects matplotlib for that user.

Offline

#8 2023-08-19 13:11:46

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,202

Re: [SOLVED] Available system-level packages not working in Spyder

That indicates there's something wrong in your normal user setup that prevents spyder from detecting matplotlib .

Does removing ~/.config/spyder-py3 and ~/.local/share/Spyder for your normal user (forcing spyder to re-initialise it's setup) help ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#9 2023-08-19 13:27:01

mtubarch
Member
From: Italy
Registered: 2023-02-16
Posts: 46

Re: [SOLVED] Available system-level packages not working in Spyder

Yes it does: now spyder detects matplotlib for the normal user. I mark the thread as solved. Thank you very much for taking the time to help me.

Offline

Board footer

Powered by FluxBB