Hi! I’m working with Julia 1.6.5 and Gurobi 9.5.0 on Visual Studio. I’ve acquired an academic license and have uninstall and reinstall everything twice. I can’t figure out why when adding Gurobi, Julia chooses a previous edition instead of the latest one. I’ve set the correct environment path for Gurobi and placed the license there as well. You can see below the errors I’m getting.
When simply executing “Pkg.add” I’m getting
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.8
✗ Gurobi
0 dependencies successfully precompiled in 22 seconds (41 already precompiled)
1 dependency errored. To see a full report either run import Pkg; Pkg.precompile()
or load the package
And the precompile shows that:
ERROR: The following 1 direct dependency failed to precompile:
Gurobi [2e9cd046-0924-5485-92f1-d5272153d98b]
Failed to precompile Gurobi [2e9cd046-0924-5485-92f1-d5272153d98b] to C:\Users\Nosdi\AppData\Local\NEMO\depot\compiled\v1.6\Gurobi\jl_D792.tmp.
ERROR: LoadError: Gurobi not properly installed. Please run Pkg.build(“Gurobi”).
Finally Pkg.build is facing this issue:
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 like
libgurobiXXX.so
, libgurobiXXX.dylib
, or gurobiXXX.dll
. You
should update your GUROBI_HOME environment variable to point to the
correct location.
Stacktrace:
[1] pkgerror(msg::String)
@ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:55
[2] (::Pkg.Operations.var"#82#87"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec})()
@ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1049
[3] withenv(::Pkg.Operations.var"#82#87"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec}, ::Pair{String, String}, ::Vararg{Pair{String, B} where B, N} where N)
@ Base .\env.jl:161
[4] (::Pkg.Operations.var"#109#113"{String, Pkg.Operations.var"#82#87"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec}, Pkg.Types.PackageSpec})()
@ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1547
[5] with_temp_env(fn::Pkg.Operations.var"#109#113"{String, Pkg.Operations.var"#82#87"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec}, Pkg.Types.PackageSpec}, temp_env::String)
@ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1449
[6] (::Pkg.Operations.var"#108#112"{Pkg.Operations.var"#82#87"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec}, Pkg.Types.Context, Pkg.Types.PackageSpec, String, Pkg.Types.Project, String})(tmp::String)
@ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1522
[7] mktempdir(fn::Pkg.Operations.var"#108#112"{Pkg.Operations.var"#82#87"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec}, Pkg.Types.Context, Pkg.Types.PackageSpec, String, Pkg.Types.Project, String}, parent::String; prefix::String)
@ Base.Filesystem .\file.jl:729
[8] mktempdir(fn::Function, parent::String) (repeats 2 times)
@ Base.Filesystem .\file.jl:727
[9] sandbox(fn::Function, ctx::Pkg.Types.Context, target::Pkg.Types.PackageSpec, target_path::String, sandbox_path::String, sandbox_project_override::Pkg.Types.Project)
@ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1488
[10] build_versions(ctx::Pkg.Types.Context, uuids::Vector{Base.UUID}; verbose::Bool)
@ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1030
[11] build(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, verbose::Bool)
@ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:911
[12] build(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; verbose::Bool, kwargs::Base.Iterators.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:900
[13] build(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:80
[14] build(pkgs::Vector{Pkg.Types.PackageSpec})
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:78
[15] build#71
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:76 [inlined]
[16] build
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:76 [inlined]
[17] build#70
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:75 [inlined]
[18] build(pkg::String)
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:75
[19] top-level scope
@ REPL[8]:1