Python environment with matplotlib
and jupyter
causes run-time Qt version conflicts in LXQt desktop environment
#299385
Labels
Describe the bug
When constructing a python environment wrapper, picking up
matplotlib
andjupyter
, executingpython3
inside a terminal emulator on LXQt desktop environment, and plotting withplot()
provided bymatplotlib.pyplot
, MatPlotLib complainsSteps To Reproduce
Steps to reproduce the behavior:
nixos-23.11
branch, where the version of Qt 5 is 5.15.11.lxqt-about --version
and see the Qt version. Mine iscd
to the Nixpkgs project directory.nixos-unstable
ornixos-23.11
(56528ee or later) where the Qt 5 version is 5.15.12 or later.nix eval .#qt5.full.name
. The output on my machine is"qt-full-5.15.12"
.nix run --impure --expr "(import ./. { }).python3.withPackages (ps: with ps; [ matplotlib jupyter ])"
.import matplotlib.pyplot as plt
and press enterplt.plot([1, 2, 3], [1, 1, 1])
and press enterOne-liner of the Python execution part:
nix shell --impure --expr "(import ./. { }).python3.withPackages (ps: with ps; [ matplotlib jupyter ])" -c python3 -c "__import__('matplotlib.pyplot').pyplot.plot([1, 2, 3], [1, 1, 1])"
(It cannot be replaced with
nix run
due to a Nix bug NixOS/nix#8900.)Expected behavior
There should be no error and no abortion. The interactive environment should print something like
[<matplotlib.lines.Line2D object at 0x7fb179f10d50>]
afterplot()
, and show the plot afterplt.show()
. The one-liner should print nothing.Screenshots
Additional context
Notify maintainers
@lovek323 @veprbl (MatPlotLib maintainers)
@costrouc (author of a Jupyter refactoring commit 6102dd1)
@FRidh (Python package committer)
@romildo (LXQt maintainer)
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: