Julia not using the most recent version of Gurobi

I have been using Gurobi 9.0.1 in Julia with JuMP. Now I have installed Gurobi 9.1.2, but the output of Gurobi in Julia indicates that it is still using 9.0.1. How do I make it use the most recent version of Gurobi?

I checked ENV["GUROBI_HOME"] in Julia and it is pointing to Gurobi 9.1.2

By the way, after I installed Gurobi 9.1.2, I have not updated or rebulit my Gurobi.jl whose version is Gurobi v0.9.3. Do I need to re-do again something like Pkg.build("Gurobi") or reinstall it?

Thanks.

Do I need to re-do again something like Pkg.build("Gurobi") or reinstall it?

Yes, I think this should help. Looking at Gurobi.jl/deps/build.jl, we can see that the build process stores a link to the shared library to be used by Gurobi.jl. Maybe the old deps.jl should be deleted as well, before running build.

1 Like

If you update Gurobi, you need to re-run Pkg.build. No need to delete old files.

2 Likes

Thank you.

If I want to change between different versions of Gurobi, do I just change the ENV["GUROBI_HOME"] to the corresponding Gurobi version I want to use, and then re-run Pkg.build("Gurobi")?

1 Like

Yes