How to install pyqt for PythonPlot

I would like to use PythonPlot.jl with the QT backend. But how can I install it? I tried:

using CondaPkg
# press ]
(Climate) pkg> conda add pyqt5

which doesn’t work, it cannot find the package:

error    libmamba Could not solve for environment specs
    The following package could not be installed
    └─ pyqt5 *  does not exist (perhaps a typo or a missing channel).

Any idea?

1 Like

pkg> conda add pyqt

Or

pkg> conda add anaconda::pyqt

?

2 Likes

If I do:

mkdir test
cd test
julia --project="."

and then

# press ]
add CondaPkg
# press <backspace>
using CondaPkg
# press ]
conda add pyqt
add PythonPlot
# press <backspace>
using PythonPlot

I get the error:

ERROR: InitError: Python: ModuleNotFoundError: No module named 'matplotlib'
Python stacktrace: none
Stacktrace:
  [1] pythrow()
    @ PythonCall ~/.julia/packages/PythonCall/dsECZ/src/err.jl:94
  [2] errcheck
    @ ~/.julia/packages/PythonCall/dsECZ/src/err.jl:10 [inlined]
  [3] pyimport(m::String)
    @ PythonCall ~/.julia/packages/PythonCall/dsECZ/src/concrete/import.jl:11
  [4] __init__()
    @ PythonPlot ~/.julia/packages/PythonPlot/f591M/src/init.jl:148
  [5] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1074
  [6] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
    @ Base ./loading.jl:1020
  [7] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
    @ Base ./loading.jl:1469
  [8] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:1750
  [9] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1623
 [10] macro expansion
    @ ./loading.jl:1611 [inlined]
 [11] macro expansion
    @ ./lock.jl:267 [inlined]
 [12] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1574
during initialization of module PythonPlot

Any idea?

So I could install pyqt, but it does not work together with PythonPlot …

pkg> conda add matplotlib
?