juliaprecompileplots.jl

Julia doesn't precompile Plots


I'm using Julia 1.8 on my Mac with VS code. However I've been having a problem with the package Plots for many days. Basically if I download the package with:

import Pkg
using Pkg
Pkg.add("Plots")

I get the following output: pastebin link

So, as you see in the output, there is an "x" mark in correspondence to GR_jll and Plots package. This makes me think that something in the installation of these packages didn't work properly, but I'm not sure if that's the root of the problem or how to fix it.

Then if I proceed to run:

using Plots

I get: pastebin link 2

So it looks like Julia fails to precompile the package "Plots".

I've had this problem for several days and I tried many things: uninstall and install again both Julia and VS code, doing updates and so on. However nothing has worked. It is strange because before it was working just fine and I was able to use the package "Plots" to plot and visualize my data. But all of a sudden it started to give me this error.

So any help to solve the problem is very appreciated!


Solution

  • The newest version of GR does not like some older macOS versions. You may be able to solve the problem by updating any or all of macOS, FFMPEG, and GR. See here:

    https://discourse.julialang.org/t/failing-to-precompile-plots-due-to-loaderror-mac-edition/87911/12