GR build problems: "installation is incomplete"

My students are still getting the error reported here:

But since this was over 6 months ago and not adequately resolved I am raising it again.

This semester, I took a chance and decided to be the first in my University to set Julia, to a class of 100 Data Science students, and now they are up in arms, mostly over the fact that after working fine for most of the semester, Plots has stopped working for them, just as they are completing their final projects and seems to be unfixable, despite reinstallations, suggested fixes etc.

The initial error message many of them are getting is:

Your GR installation is incomplete.   Rerun build step for GR package.

This does not solve the problems, nor does deleting/reinstalling Plots or any of the suggested fixes in the (lengthy) discourse link above

Thanks for any urgent help on this, as some students are very frustrated (as am I).

Even a workaround would be great at this point. Is it possible to run Plots without GR?

2 Likes

I canā€™t help with this problem, specifically, but in order for others to help out I think we need more information.

  1. What version of Julia are your students using?
  2. What version of Plots are they using?
  3. What changed that caused Plots to stop failing (Project.toml, etc.)
  4. Which platforms are the students on who are having trouble? Windows, Mac, Linux, etc.
  • It is possible to user older version of packages if a new one is problematic. This can be done with e.g. pkg> add GR@0.54 to use the 0.54.x version of GR.
  • A good idea is to keep the Manifest.toml around. That file contains all the version of the packages used so that things can be reproduced in case an update goes bad.
1 Like

Maybe switch to plotly() backend?

Hi PD, thanks, the are all using Julia 1.5.3, whatever the latest version of Plots is, I donā€™t know what changed that would make it all fail, and I think most of the ones having problems are on Windows, though I had this problem myself some time ago, and Iā€™m on Mac (canā€™t remember how I fixed it, but it was not easy or obvious).

Thanks

I had something similar. What I did was :

]rm GR
]rm GR_jll
]registry update
]add GR
]build GR

At some point I also had a dirty registry so I went into the .julia/registries/General folder and ran

git reset --hard
git pull

Maybe something works.

2 Likes

The usual workaround for me is to rm -rf .julia.

Also, not too helpful, but I advise students to use PyPlot instead of Plots (because I could never figure out how to zoom in Plots, and because students are already familiar with matplotlib). Of course that opens the can of worms that is PyCall and python installations, but thatā€™s needed for jupyter anyway.

2 Likes

Thanks all for your suggestions (and for getting back to me quickly - I am hoping
to alleviate panic).

I will pass them on to the students and see what works for them and report back here!.

Hiya,

I will certainly ask them to do the first one. Would an alternative to the second be just deleting Registry.toml ? I have in the past used that to solve some other problems.
And btw, is the second suggestion run within julia, or at the shell commandline?

Thanks

The git commands were run in the command line, but I think there is also a Julia interface for git built into Base. Also the folder was .julia/registries/General . Iā€™ll fix it in the post above.

Git can be called inside Julia by using LibGit2

Maybe @StefanKarpinski knows a better way to fix a broken registry or clean a broken package install.
Also @jheinen might be able to help with GR.

Did you try the last reply from the discussion mentioned above:

Yes I have this problem sometimes and can confirm that the only fix is usually to remove .julia.

I find Plots.jl to very fragile as well.

I have had similar problems show up in the past week for both Windows and Linux installsā€“I thought it was related to upgrading to Julia 1.6, but maybe not, if your students are all on 1.5. Uninstalling GR and GR_jll, running ] gc, (and possibly manually deleting their directories in .julia/packages) and then reinstalling was what worked for me.

Thanks. I wondered about this. So you have found that it works? And it rebuilds itself? I suppose you have to add everything again.

Thanks. I do wish they would fix Plots and/or GR

You should only have to instantiate if you have a Project.toml in your directory.

I do wish they would fix Plots and/or GR

It looks like there arenā€™t an issues filed for this bug. If you are having problems, itā€™s good to report them on github.

1 Like

Thanks, but I donā€™t know what this means (sorry for my ignorance).

You decided to teach a class of 100 Data Science students without reading into how to properly manage an environment in Julia?

You can do ] instantiate when there is an existing Project.toml or a Manifest.toml and Julia will download all the packages listed in either one, at the correct versions.

3 Likes

Anyway, I didnā€™t want the class to be too formulaic - I want to encourage students to be self-reliant. And, apart from a few teething problems, it worked. Almost. Just except this bug.

Thanks for your thoughts

*** Update*** someone has suggested that downgrading GR to 0.55.0 fixes the problem

PS I wonder if something as basic and essential as plotting should have at least a basic working version in Base? It is wonderful that people contribute packages like Plots and GR, but if Julia is to be relied upon for research and teaching, shouldnā€™t underwriting/ensuring the stability of basic programming functionality be a priority?

PPS If I were to give then a common Project.toml or Mainfest.toml, would they be able to add new packages if I missed some that they needed?

3 Likes

It would be awesome if this kind of issues were fixed. I donā€™t think people (esp. students) should have to figure out instantiate, Project.toml, Manifest.toml etc in order to use Julia for quick plotting. It sounds crazy to me that the solution is to do ā€œrm -rf .juliaā€

8 Likes

Yes!!!

Well, Iā€™ve run multiple courses and workshops with almost no issues at all. The thing is that I carefully prepared a (fixed) Julia environment (Project.toml + Manifest.toml) and made sure that my environment works on a plain Windows / Linux VM. The students than just used my tested environment.

(And I also offered a last-resort alternative like mybinder.org where everything was guaranteed (because tested) to work.)

(See GitHub - carstenbauer/JuliaNRW21: Julia workshop @ HPC.NRW for example. Note that I even created a little WorkshopWizard.jl to simplify the process for them even further.)

6 Likes