Plots Broken on Mac

After woking on my project i saved, quit everything and updated to the new version of Mac Big Sur 11.5.1. Once i got the next day Julia refused to plot anything.

While in REPL, typing the command

julia> plot(collect(1:10))

Outputs:

Error showing value of type Plots.Plot{Plots.GRBackend}:
ERROR: SystemError: opening file “/var/folders/n4/v68tks417jgbblt7ybkj732m0000gn/T/jl_QMthMw.png”: No such file or directory

I’m running everything on an M1 mac, with Atom 1.55.0, if it makes any differences.

I’ve tried building GR and Plots again. As well as re-installing atom, after deleting everything in “~/.julia”. That appeared to change the error message but didn’t resolve the issue.

GKS: dlopen(/Users/raf/.julia/artifacts/dfc23091bb4d34ea4c51543f16191f399a3a4684/lib/…/lib/cairoplugin.so, 1): Library not loaded: @rpath/libtiff.5.dylib
Referenced from: /Users/raf/.julia/artifacts/dfc23091bb4d34ea4c51543f16191f399a3a4684/lib/cairoplugin.so
Reason: Incompatible library version: cairoplugin.so requires version 13.0.0 or later, but libtiff.5.dylib provides version 11.0.0
Error showing value of type Plots.Plot{Plots.GRBackend}:
ERROR: SystemError: opening file “/var/folders/n4/v68tks417jgbblt7ybkj732m0000gn/T/jl_6XguJM.png”: No such file or directory

I’ve also read people say that this might be a permissions issue but going to System Preferences> Security and permissions > Full disk access, Julia Pro appears to be present and marked as having access.

Am i missing something obvious or is this some kind of compatibility?
How do i solve this?

Found a solution to the problem.

Run:
] rm GR
pkg> add GR@0.48

based on: Error building 'GR' · Issue #2570 · JuliaPlots/Plots.jl · GitHub

1 Like

Often after a major OS upgrade, you need to update/rebuild your packages, sometimes even reinstalling Julia helps. OS upgrade tends to reset permissions for apps and/or directories (not every time, but very often).

I wouldn’t say that this is a solution, as the current GR version is 0.58, so you’re on a pretty outdated backend (unless you want to use a different backend anyway, I suppose).

Note that the GitHub issue you linked is over a year old, at which point 0.48 was the current version so the solution essentially was to update to the latest GR. If things are broken for you on the latest GR, it’s worth figuring out what’s going on rather than using the package version from 1.5 years ago!

1 Like

I know this is a junky solution at best. But when i try to “] up GR” plots refuses to work.

Can you try just adding Plots to a temporary environment in the REPL (to rule out any Atom issues) and doing using Plots; plot(rand(10))? If you then get the same error that should be investigated further, as I assume this should be working even on M1 (although I don’t know for certain!)

1 Like

Do you use environments? If not, I would strongly recommend you look up how to set up environments and create an environment just for plotting. One reason for using environments is that some packages are essentially incompatible and attempting to have both together in the same environment forces some downgrade (package downgrading is automatic and difficult to control). If you create a new environment or, as Nils suggests, a temporary environment, with a minimal number of packages, you may very well see the problem go away. Once you’ve got environments set up, you add new packages with care and one by one. It’s a bit of a pain, but it’s the best way forward at this time.

Julia is a super dynamic, growing language with frequent package updates and you don’t want to be stuck with an old version of GR.

System: MacBook Pro (16 inch, 2019)
OS: Big Sur 11.5.1

I am having the exact same problems with Plots and StatsPlots so far. I established a clean temporary environment, and executed:

plot(rand(10))

But received same error.
Error showing value of type Plots.Plot{Plots.GRBackend}: ERROR: SystemError: opening file "/var/folders/jy/kd4mngsn2bd1j2t_kz5_lpfr0000gn/T/jl_EXxr6H.png": No such file or directory

In addition, i cleaned out all environments, removed JuliaPro , reinstalled JuliaPro and still same error.
Kinda at wits end here, looks like we all need to revert back to Python…
Any additional clues please?

Can you try with one of the downloads here?

@ptoche:
Thank you very much.
I replaced the latest JuliaPro environment with v1.6.2 for MacOS.
After adding Plots package and using plots - the test script ran fine!

Guess something in JuliaPro env is broken? Thanks.
However, the julia 1.6.2 environment does not show up in the jupyter notebook pulldown?

1 Like

That’s good news. I’m not Jupyter notebook expert. Maybe you could mark this thread as closed and start a new question specifically on Jupyter. :slight_smile: