PyPlot.jl
PyPlot.jl copied to clipboard
PyPlot on Mac with Pluto - backend identification problems.
Hi, I just cross-link this issue from Pluto here: https://github.com/fonsp/Pluto.jl/issues/511 PyPlot seems to work smoothly in Pluto, but on some (?) Mac installations it seems
- to either figure out the wrong backend
- or that somehow the qt5agg backend doesn't see that it runs from a notebook
Manually setting the backend seems to help.
I have the same problem. I'm running macOS Catalina 10.15.7. I went as far as deleting my entire Anaconda distribution thinking it was a problem with the base environment. I then deleted Julia 1.5.3. I reinstalled Julia 1.5.3 first (before installing Anaconda distribution) and then tried running a sample notebook that involved PyPlot. I got the same seg.fault error involving this PyQT GUI library. The method that sp94 proposed worked for me--writing pygui(false)
right after the line using PyPlot
. Unfortunately, the command-line command suggested by j-fu (MPLBACKEND=Agg
) did not work for me. I did not try the other suggestion by j-fu wherein one writes ENV["MPLBACKEND"]="Agg"
within the Pluto notebook before importing the PyPlot package, using PyPlot
, within the .jl file itself.
My browser is up-to-date (Chrome). It's not a problem with Anaconda base environment interfering with the set-up. It may be that this error is caused by the recent Julia update and /or the recent macOS Catalina update.
Just to clarify, I double-checked whether I did a complete and clean uninstall of Anaconda distribution (including all libraries and python3).