Open francescoalemanno opened 2 years ago
I had the same problem. Was playing around with it the other day and came up with something seems to work for the time being. Just thought I would post it here for reference.
using PyCall
pygui(:tk)
using PyPlot
... or add the following line to ~/.matplotlib/matplotlibrc
backend : TkAgg
Note: I get a warning about Tk being buggy but I haven't run into any problems yet.
julia> versioninfo()
Julia Version 1.8.0-DEV.1268
Commit 955d427135 (2022-01-10 15:37 UTC)
Platform Info:
OS: macOS (arm64-apple-darwin21.3.0)
CPU: Apple M1 Max
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.0 (ORCJIT, cyclone)
Environment:
JULIA_NUM_THREADS = 5
Yes I have the same problem on my new macbook pro.
I was able to get pyqt working with PyPlots by installing pyqt via a special Conda channel:
Conda.add("pyqt", channel="andfoy")
Also it seems that conda channel robostack-experimental has pyqt for arm64.... just wish I knew which channel was better or that I trusted these rare "one off" channels.
Why hasn't Conda-forge added arm64 version of pyqt?
Works fine for me on M1; maybe this was a recent problem with Conda?
You can always try a different backend, e.g. set ENV["MPLBACKEND"]="tkagg"
before loading PyPlot.
Steve how did you install PyQt5? With Julia and PyPlots, the default conda channels don't even have a working version of pyqt for arm64 chips.... so maybe you had added other conda channels or installed PyQt5 via other methods beyond the Julia Conda package manager?
I just let Conda install it with the default installer, I didn't do anything special:
julia> Conda.list()
[ Info: Running `conda list` in root environment
# packages in environment at /Users/stevenj/.julia/conda/3:
#
# Name Version Build Channel
adwaita-icon-theme 40.1.1 hca03da5_1
appnope 0.1.2 py38hca03da5_1001
argon2-cffi 20.1.0 py38h1a28f6b_2
...
pyqt 5.15.2 py38he8f2410_0
pyqt5-sip 4.19.25 pypi_0 pypi
pyqtchart 5.15.2 pypi_0 pypi
...
I'm just using the default channels:
julia> run(Conda._set_conda_env(`$(Conda.conda) config --show channels`))
channels:
- defaults
Ok, but we all need to see which conda channel your pyqt came from. pyqt doesn't seem to be available with the normal conda channels.
PyQt for M1 macs is now available from conda-forge (and also from the andfoy channel, which is what I was using earlier this year before the conda-forge build became available)
conda install pyqt -c conda-forge
Perhaps this means this issue can now be closed?
Any known workarounds?