Trouble using plots (on macOS)

Installing Plots with GR worked with a new install and a clean environment that I did to evaluate what may be happening in your case in the past 24 hours. Both worked seamlessly for me on Ubuntu 22.04 and macOS so it is hard to say what is broken without further information from you about your system.

I recently helped to fix a Plots/GR install in two other instances in 24 hours. Here is one on Discourse:

It is not clear me to if you tried using GR on your Mac. The other thing we have not tried yet is using the upstream binaries from https://gr-framework.org/ . In contrast to the Julia packaging approach which tried to be self-contained, those binary packages are linked against specific system binaries:
C library GR — GR Framework 0.72.10 documentation

After untaring the tarball, you can try

using GR # repeat this until it loads
GR.GRPreferences.use_system_binary("/path/to/gr"; force = true)

One thing I am working thriugh at the moment is decreasing GR.jl’s dependence on environment variables. It could be that your PATH environment variable is setup that it tries load some outside library unknown to us before it can load the binaries that we provide.

What is the output of ENV["PATH"] before and after you load Plots?

Currently you are trying to combine Julia with an Anaconda install linked to the Intel MKL library. This is proprietary software so it is difficult for us to support here. We do have a way to use the MKL in Julia, but the effort is likely overkill if all you would like to do is plot.

If you want to try a conda based solution, I have some involvement with conda-forge so it would be easier to support a conda environment exclusively using that conda-forge channel. Heck you could even install Julia via conda-forge on macOS at the moment. My recommendation these days is to use mambaforge rather than Anaconda these days.

From there you could setup an environment using

mamba install -c conda-forge -n python_julia numpy pyjulia julia
mamba activate python_julia

Swapping conda for mamba should work as well, but mamba is a lot faster in my experience.

We’re superficially surveying a bunch of different approaches. It might be better to choose the on me that is furthest along and drill into it.

1 Like