Fail to update Gurobi.jl for using Gurobi 11.0

Hi! I’m working with Julia 1.5.3 and Gurobi 11.0 on Atom. I’ve acquired an academic license for Gurobi 11.0 and installed the Gurobi 11.0. I’ve set the correct environment path for Gurobi and placed the license there as well. When I tried to use it in Julia, I knew the first thing was to update the Gurobi.jl to at least v1.2.0. However, I fail in the update. The Gurobi.jl can be only updated to v0.10.3. I have already tried a few methods that I found in previous relevant posts, such as “import Pkg;Pkg.update();Pkg.add(“Gurobi”);Pkg.build(“Gurobi”) or pkg"add Gurobi@1.2.0”, but they still don’t work. I can’t figure out how to update Gurobi.jl to the required version in my setup. You can see below the errors I’m getting.

julia> Pkg.status()
Status C:\Users\chunhua\.julia\environments\v1.5\Project.toml
[c52e3926] Atom v0.12.30
[336ed68f] CSV v0.10.4
[9961bab8] Cbc v0.9.1
[a93c6f00] DataFrames v1.3.6
[0c46a032] DifferentialEquations v6.18.0
[89b67f3b] ExcelFiles v1.0.0
[2e9cd046] Gurobi v0.10.3
[b6b21f68] Ipopt v0.9.1
[4076af6c] JuMP v0.22.3
[2ddba703] Juniper v0.8.0
[e5e0dc1b] Juno v0.8.4
[6405355b] Mosek v1.2.3
[1ec41992] MosekTools v0.11.0
[2774e3e8] NLsolve v4.5.1
[1dea7af3] OrdinaryDiffEq v5.61.3
[91a5bcdd] Plots v1.15.2
[438e738f] PyCall v1.96.4
[d330b81b] PyPlot v2.11.2
[bd369af6] Tables v1.11.1
[61d0e4fa] Taro v0.8.5
[fdbf4ff8] XLSX v0.7.10

julia> pkg"add Gurobi@1.2.0"
Updating registry at C:\Users\chunhua\.julia\registries\General
Resolving package versions…
ERROR: Unsatisfiable requirements detected for package Gurobi [2e9cd046]:
Gurobi [2e9cd046] log:
├─possible versions are: [0.5.0-0.5.9, 0.6.0, 0.7.0-0.7.7, 0.8.0-0.8.1, 0.9.0-0.9.14, 0.10.0-0.10.3, 0.11.0-0.11.5, 1.0.0-1.0.4, 1.1.0, 1.2.0-1.2.1] or uninstalled
├─restricted to versions 1.2.0 by an explicit requirement, leaving only versions 1.2.0
└─restricted by julia compatibility requirements to versions: [0.5.0-0.5.9, 0.6.0, 0.7.0-0.7.7, 0.8.0-0.8.1, 0.9.0-0.9.14, 0.10.0-0.10.3] or uninstalled — no versions left
Stacktrace:
[1] propagate_constraints!(::Pkg.Resolve.Graph, ::Set{Int64}; log_events::Bool) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Resolve\graphtype.jl:1005
[2] propagate_constraints! at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Resolve\graphtype.jl:946 [inlined] (repeats 2 times)
[3] simplify_graph!(::Pkg.Resolve.Graph, ::Set{Int64}; clean_graph::Bool) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Resolve\graphtype.jl:1460
[4] simplify_graph! at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Resolve\graphtype.jl:1460 [inlined] (repeats 2 times)
[5] resolve_versions!(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:375
[6] targeted_resolve at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:1114 [inlined]
[7] tiered_resolve(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:1100
[8] _resolve at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:1120 [inlined]
[9] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}, ::Array{Base.UUID,1}; preserve::Pkg.Types.PreserveLevel, platform::Pkg.BinaryPlatforms.Windows) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:1135
[10] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}; preserve::Pkg.Types.PreserveLevel, platform::Pkg.BinaryPlatforms.Windows, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:188
[11] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:139
[12] #add#21 at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:67 [inlined]
[13] add(::Array{Pkg.Types.PackageSpec,1}) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:67
[14] do_cmd!(::Pkg.REPLMode.Command, ::Pkg.REPLMode.MiniREPL) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\REPLMode\REPLMode.jl:404
[15] do_cmd(::Pkg.REPLMode.MiniREPL, ::String; do_rethrow::Bool) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\REPLMode\REPLMode.jl:382
[16] top-level scope at none:1

julia> using Gurobi
[ Info: Precompiling Gurobi [2e9cd046-0924-5485-92f1-d5272153d98b]
ERROR: LoadError: Gurobi not properly installed. Please run Pkg.build(“Gurobi”). For
more information go to GitHub - jump-dev/Gurobi.jl: Julia interface for Gurobi Optimizer

Stacktrace:
[1] error(::String) at .\error.jl:33
[2] top-level scope at C:\Users\chunhua.julia\packages\Gurobi\WjZv8\src\Gurobi.jl:17
[3] include(::Function, ::Module, ::String) at .\Base.jl:380
[4] include(::Module, ::String) at .\Base.jl:368
[5] top-level scope at none:2
[6] eval at .\boot.jl:331 [inlined]
[7] eval(::Expr) at .\client.jl:467
[8] top-level scope at .\none:3
in expression starting at C:\Users\chunhua.julia\packages\Gurobi\WjZv8\src\Gurobi.jl:7
ERROR: Failed to precompile Gurobi [2e9cd046-0924-5485-92f1-d5272153d98b] to C:\Users\chunhua.julia\compiled\v1.5\Gurobi\do9v6_Ax2cp.ji.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1305
[3] _require(::Base.PkgId) at .\loading.jl:1030
[4] require(::Base.PkgId) at .\loading.jl:928
[5] require(::Module, ::Symbol) at .\loading.jl:923

Hi @Chunjun, welcome to the forum.

You need to install at Julia v1.6 or newer. See Download Julia for details.

Julia v1.5.3 is unsupported and it is not compatible with recent versions of Gurobi.jl.

1 Like

Hi @odow, many thanks for your help. Your instruction solves this problem well.

1 Like

Is this true? You’re the second person within a week or so on here to say they are still running Julia in Atom, which is astounding given how long Juno has been abandoned in favour of the VSCode extension. I would recommend you make that switch as well to minimise issues going forward.