Julia doesn't install latest version of Gurobi
AnsweredI'm using Julia 1.6.5 and I've installed Gurobi 9.5.0 but apparently Julia only accepts versions up to 0.8.2 as it is right now. How could I fix this bug? Everything is updated and uninstalled and reinstalled from scratch.
'''
julia> Pkg.build(“Gurobi”)
Building Gurobi → C:\Users\Nosdi\AppData\Local\NEMO\depot\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\f36a2fa62909675681aec582ccfc4a4a629406e4\build.log
ERROR: Error building Gurobi
:
ERROR: LoadError: Unable to locate Gurobi installation. If the advice above did not help,
open an issue at GitHub - jump-dev/Gurobi.jl: Julia interface for Gurobi Optimizer and post the full
print-out of this diagnostic attempt.
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:33
[2] top-level scope
@ C:\Users\Nosdi\AppData\Local\NEMO\depot\packages\Gurobi\7YNJV\deps\build.jl:154
[3] include(fname::String)
@ Base.MainInclude .\client.jl:444
[4] top-level scope
@ none:5
in expression starting at C:\Users\Nosdi\AppData\Local\NEMO\depot\packages\Gurobi\7YNJV\deps\build.jl:152
Unable to locate Gurobi installation. Running some common diagnostics.
Gurobi.jl only supports the following versions:
- gurobi90
- gurobi81
- gurobi80
- gurobi75
- gurobi70
Did you download and install one of these versions from gurobi.com?
Found GUROBI_HOME = C:\gurobi950\win64
Does this point to the correct install location?
- on Windows, this might be
C:\Program Files\gurobi810\win64\
- alternatively, on Windows, this might be
C:/Program Files/gurobi810/win64/
- on OSX, this might be
/Library/gurobi810/mac64/
- on Unix, this might be
/home/my_user/gurobi810/linux64/
Note: this has to be a full path, not a path relative to your current
directory or your home directory.
We’re going to look for the Gurobi library in this directory:
C:\gurobi950\win64\bin
That directory has the following files:
- C:\gurobi950\win64\bin\Gurobi95.NET.XML
- C:\gurobi950\win64\bin\Gurobi95.NET.dll
- C:\gurobi950\win64\bin\GurobiJni95.dll
- C:\gurobi950\win64\bin\grb_ts.exe
- C:\gurobi950\win64\bin\grbcluster.exe
- C:\gurobi950\win64\bin\grbgetkey.exe
- C:\gurobi950\win64\bin\grbprobe.exe
- C:\gurobi950\win64\bin\grbtune.exe
- C:\gurobi950\win64\bin\gurobi.bat
- C:\gurobi950\win64\bin\gurobi95.dll
- C:\gurobi950\win64\bin\gurobi95_light.dll
- C:\gurobi950\win64\bin\gurobi_cl.exe
- C:\gurobi950\win64\bin\vslauncher.exe
- C:\gurobi950\win64\bin\vswhere.exe
We were looking for (but could not find) a file named likelibgurobiXXX.so
, libgurobiXXX.dylib
, or gurobiXXX.dll
. You
should update your GUROBI_HOME environment variable to point to the
correct location.
'''
-
Are you using the latest version of Gurobi.jl (v0.10.1) from jump-dev?
According to jump-dev/Gurobi.jl,
Gurobi.jl requires Gurobi version 9.0 or 9.1 or 9.5.
0 -
Hi Alison Cozad, thank you for your reply! When removing and re-adding the Gurobi Pkg in Julia this is what I get:
julia> Pkg.add("Gurobi")
Resolving package versions...
Updating 'C:\Users\Nosdi\AppData\Local\NEMO\depot\environments\v1.6\Project.toml'
[2e9cd046] + Gurobi v0.8.1
Updating 'C:\Users\Nosdi\AppData\Local\NEMO\depot\environments\v1.6\Manifest.toml'
[2e9cd046] + Gurobi v0.8.1
[fdba3010] + MathProgBase v0.7.8which I think is the issue cause it should be installing a later version of Gurobi.
0 -
Ah, I think I see the confusion here. There are two things that are named quite similarly:
-
Gurobi Optimizer
This is the Gurobi solver. The latest version is 9.5.
-
Gurobi.jl
The Gurobi.jl package is the Julia interface for Gurobi Optimizer. This package is maintained by the JuMP community. It appears that you are using the Gurobi.jl v0.8.1 which was released in May of 2020. To my knowledge, this version is not compatible with Gurobi Optimizer version 9.5.
I recommend upgrading to the Gurobi.jl v0.10.1 and following the installation instructions here: jump-dev/Gurobi.jl. You will need to make sure your GUROBI_HOME environment variable is set in the process.
0 -
Gurobi Optimizer
-
I have followed this guide, where step by step I do the following: Got the license and installed the Gurobi 9.5.0, then set the environment path (in my case: C:\gurobi950\win64) and lastly I add and build Gurobi. The result is the same, Julia installs Gurobi v0.8.1 instead of the latest Gurobi.jl. I believe that smth is blocking the installation of the latest version but can't figure out what.
0 -
Hi Konstantinos,
Your issue appears to be the same as that one on the GitHub of Gurobi.jl:
Gurobi 9.5.0 -- Unable to locate Gurobi installation. Running some common diagnostics · Issue #440 · jump-dev/Gurobi.jl (github.com)Apparently, you need to update JuMP to make the current Gurobi version available.
I just tested the installation instructions in a fresh Julia 1.7.1 environment on Windows and everything worked as intended.
Cheers,
Matthias0 -
Hi Matthias Miltenberger, my JuMP is 0.21.2 and when executing Pkg.update() no changes are been made. Also, I have followed this thread before posting and didn't actually resolve my issue. Finally, even when I'm removing the JuMP package and re-add it to Julia, gurobi still won't update to the latest version. There's definitely something preventing it from updating which I can't figure out.
Btw I'm using Julia 1.6.5 cause I had some other issues with working with 1.7.1 is Visual Studio.
0 -
Hi Konstantinos Konstantinidis,
I just replicated the same procedure using Julia 1.6.5 and it still works just the same - no issues on my machine.
Maybe you can try re-installing Julia? I don't know how else we could help you here. This appears to be a Julia/JuMP/Gurobi.jl issue.
Best regards,
Matthias0 -
Yes I will, I think that some residual files when uninstalling could be the issue so I'll try to do a powerfull/clean uninstall so that all previous editions are completely deleted.
Thank you very much for your time!
0
Please sign in to leave a comment.
Comments
8 comments