Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error building Gurobi: #333

Closed
lausilvag opened this issue Jun 10, 2020 · 6 comments
Closed

Error building Gurobi: #333

lausilvag opened this issue Jun 10, 2020 · 6 comments

Comments

@lausilvag
Copy link

lausilvag commented Jun 10, 2020

Hi!
I have this error when I try to install gurobi pkg.

julia> Pkg.build("Gurobi")
  Building Gurobi → `C:\Users\Laura\.juliapro\JuliaPro_v1.2.0-1\packages\Gurobi\TX8tY\deps\build.log`
┌ Error: Error building `Gurobi`: 
│ ERROR: LoadError: Unable to locate Gurobi installation. If the advice above did not help,
│ open an issue at https://github.com/JuliaOpt/Gurobi.jl and post the full
│ print-out of this diagnostic attempt.
│ 
│ Stacktrace:
│  [1] error(::String) at .\error.jl:33
│  [2] top-level scope at C:\Users\Laura\.juliapro\JuliaPro_v1.2.0-1\packages\Gurobi\TX8tY\deps\build.jl:145
│  [3] include at .\boot.jl:328 [inlined]
│  [4] include_relative(::Module, ::String) at .\loading.jl:1094
│  [5] include(::Module, ::String) at .\Base.jl:31
│  [6] include(::String) at .\client.jl:431
│  [7] top-level scope at none:5
│ in expression starting at C:\Users\Laura\.juliapro\JuliaPro_v1.2.0-1\packages\Gurobi\TX8tY\deps\build.jl:143
│ Unable to locate Gurobi installation. Running some common diagnostics.
│ 
│ Gurobi.jl only supports the following versions:
│ 
│  - gurobi81
│  - gurobi80
│  - gurobi75
│  - gurobi70
│ 
│ Did you download and install one of these versions from gurobi.com?
│ 
│ 
│ Found GUROBI_HOME =  C:\gurobi902\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:\gurobi902\win64\bin
│ 
│ That directory has the following files:
│ 
│  - C:\gurobi902\win64\bin\grbcluster.exe
│  - C:\gurobi902\win64\bin\grbgetkey.exe
│  - C:\gurobi902\win64\bin\grbprobe.exe
│  - C:\gurobi902\win64\bin\grbtune.exe
│  - C:\gurobi902\win64\bin\grb_ts.exe
│  - C:\gurobi902\win64\bin\gurobi.bat
│  - C:\gurobi902\win64\bin\gurobi.env
│  - C:\gurobi902\win64\bin\gurobi90.dll
│  - C:\gurobi902\win64\bin\Gurobi90.NET.dll
│  - C:\gurobi902\win64\bin\Gurobi90.NET.XML
│  - C:\gurobi902\win64\bin\gurobi90_light.dll
│  - C:\gurobi902\win64\bin\GurobiJni90.dll
│  - C:\gurobi902\win64\bin\gurobi_cl.exe
│  - C:\gurobi902\win64\bin\pysetup.bat
│  - C:\gurobi902\win64\bin\vslauncher.exe
│  - C:\gurobi902\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.
└ @ Pkg.Operations C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\Pkg\src\Operations.jl:1138

julia> ENV["GUROBI_HOME"]
"C:\\gurobi902\\win64"

julia> import Pkg; Pkg.build("Gurobi")
  Building Gurobi → `C:\Users\Laura\.juliapro\JuliaPro_v1.2.0-1\packages\Gurobi\TX8tY\deps\build.log`
┌ Error: Error building `Gurobi`: 
│ ERROR: LoadError: Unable to locate Gurobi installation. If the advice above did not help,
│ open an issue at https://github.com/JuliaOpt/Gurobi.jl and post the full
│ print-out of this diagnostic attempt.
│ 
│ Stacktrace:
│  [1] error(::String) at .\error.jl:33
│  [2] top-level scope at C:\Users\Laura\.juliapro\JuliaPro_v1.2.0-1\packages\Gurobi\TX8tY\deps\build.jl:145
│  [3] include at .\boot.jl:328 [inlined]
│  [4] include_relative(::Module, ::String) at .\loading.jl:1094
│  [5] include(::Module, ::String) at .\Base.jl:31
│  [6] include(::String) at .\client.jl:431
│  [7] top-level scope at none:5
│ in expression starting at C:\Users\Laura\.juliapro\JuliaPro_v1.2.0-1\packages\Gurobi\TX8tY\deps\build.jl:143
│ Unable to locate Gurobi installation. Running some common diagnostics.
│ 
│ Gurobi.jl only supports the following versions:
│ 
│  - gurobi81
│  - gurobi80
│  - gurobi75
│  - gurobi70
│ 
│ Did you download and install one of these versions from gurobi.com?
│ 
│ 
│ Found GUROBI_HOME =  C:\gurobi902\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:\gurobi902\win64\bin
│ 
│ That directory has the following files:
│ 
│  - C:\gurobi902\win64\bin\grbcluster.exe
│  - C:\gurobi902\win64\bin\grbgetkey.exe
│  - C:\gurobi902\win64\bin\grbprobe.exe
│  - C:\gurobi902\win64\bin\grbtune.exe
│  - C:\gurobi902\win64\bin\grb_ts.exe
│  - C:\gurobi902\win64\bin\gurobi.env
│  - C:\gurobi902\win64\bin\gurobi90.dll
│  - C:\gurobi902\win64\bin\Gurobi90.NET.dll
│  - C:\gurobi902\win64\bin\Gurobi90.NET.XML
│  - C:\gurobi902\win64\bin\gurobi90_light.dll
│  - C:\gurobi902\win64\bin\GurobiJni90.dll
│  - C:\gurobi902\win64\bin\gurobi_cl.exe
│  - C:\gurobi902\win64\bin\pysetup.bat
│  - C:\gurobi902\win64\bin\vslauncher.exe
│  - C:\gurobi902\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.
└ @ Pkg.Operations C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\Pkg\src\Operations.jl:1138

I appreciate your help!

@blegat
Copy link
Member

blegat commented Jun 10, 2020

It seems your version of Gurobi.jl (v0.7.3) is too old and does not support Gurobi v9.0. You should use at least Gurobi.jl v0.7.4.

@lausilvag
Copy link
Author

I am using Gurobi 9.0.2

@odow
Copy link
Member

odow commented Jun 10, 2020

Per the error message:

Gurobi.jl only supports the following versions:
│ 
│  - gurobi81
│  - gurobi80
│  - gurobi75
│  - gurobi70

You need to upgrade to the latest version of Gurobi.jl.

import Pkg
Pkg.status("Gurobi")
Pkg.update()
Pkg.status("Gurobi")  # Check 0.8.x

@lausilvag
Copy link
Author

julia> Pkg.status("Gurobi")
Status C:\Users\Laura\.juliapro\JuliaPro_v1.2.0-1\environments\v1.2\Project.toml
[2e9cd046] Gurobi v0.7.3

julia>

julia> Pkg.update()
Updating registry at C:\Users\Laura\.juliapro\JuliaPro_v1.2.0-1\registries\JuliaPro
Updating git-repo https://pkg.juliacomputing.com//registry/JuliaPro
Updating git-repo https://github.com/atoptima/Coluna.jl.git
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package SDDP [f4570300]:
SDDP [f4570300] log:
├─possible versions are: [0.1.0, 0.2.0-0.2.4, 0.3.0-0.3.2] or uninstalled
├─restricted to versions * by an explicit requirement, leaving only versions [0.1.0, 0.2.0-0.2.4, 0.3.0-0.3.2]
├─restricted by compatibility requirements with JuMP [4076af6c] to versions: 0.3.0-0.3.2 or uninstalled, leaving only versions: 0.3.0-0.3.2
│ └─JuMP [4076af6c] log:
│ ├─possible versions are: [0.18.3-0.18.6, 0.19.0-0.19.2, 0.20.0-0.20.1, 0.21.0-0.21.2] or uninstalled
│ ├─restricted to versions * by an explicit requirement, leaving only versions [0.18.3-0.18.6, 0.19.0-0.19.2, 0.20.0-0.20.1, 0.21.0-0.21.2]
│ ├─restricted by compatibility requirements with SDDP [f4570300] to versions: [0.20.0-0.20.1, 0.21.0-0.21.2]
│ │ └─SDDP [f4570300] log: see above
│ └─restricted by compatibility requirements with BlockDecomposition [6cde8614] to versions: 0.21.0-0.21.2
│ └─BlockDecomposition [6cde8614] log:
│ ├─possible versions are: [1.0.0, 1.1.0-1.1.1, 1.2.0-1.2.1] or uninstalled
│ └─restricted to versions 1.2.0-1 by Coluna [88b4ec78], leaving only versions 1.2.0-1.2.1
│ └─Coluna [88b4ec78] log:
│ ├─possible versions are: 0.3.0 or uninstalled
│ └─Coluna [88b4ec78] is fixed to version 0.3.0
└─restricted by compatibility requirements with HTTP [cd3eb016] to versions: 0.1.0 or uninstalled — no versions left
└─HTTP [cd3eb016] log:
├─possible versions are: 0.8.0 or uninstalled
└─restricted by compatibility requirements with SDDP [f4570300] to versions: 0.8.0
└─SDDP [f4570300] log: see above
Stacktrace:
[1] #propagate_constraints!#61(::Bool, ::typeof(Pkg.GraphType.propagate_constraints!), ::Pkg.GraphType.Graph, ::Set{Int64}) at C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\Pkg\src\GraphType.jl:1005
[2] propagate_constraints! at C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\Pkg\src\GraphType.jl:946 [inlined]
[3] #simplify_graph!#121(::Bool, ::typeof(Pkg.GraphType.simplify_graph!), ::Pkg.GraphType.Graph, ::Set{Int64}) at C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\Pkg\src\GraphType.jl:1460
[4] simplify_graph! at C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\Pkg\src\GraphType.jl:1460 [inlined] (repeats 2 times)
[5] resolve_versions!(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}, ::Nothing) at C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\Pkg\src\Operations.jl:388
[6] resolve_versions! at C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\Pkg\src\Operations.jl:328 [inlined]
[7] up(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\Pkg\src\Operations.jl:1278
[8] #up#33(::Pkg.Types.UpgradeLevel, ::Pkg.Types.PackageMode, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Pkg.API.up), ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\Pkg\src\API.jl:123
[9] up at C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\Pkg\src\API.jl:95 [inlined]
[10] #up#32 at C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\Pkg\src\API.jl:91 [inlined]
[11] up at C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\Pkg\src\API.jl:91 [inlined]
[12] #up#29 at C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\Pkg\src\API.jl:88 [inlined]
[13] up() at C:\Users\julia\AppData\Local\Julia-1.2.0\share\julia\stdlib\v1.2\Pkg\src\API.jl:88
[14] top-level scope at none:0

julia>

@odow
Copy link
Member

odow commented Jun 10, 2020

This might be a JuliaPro issue, which restricts the set of package versions you can use.

Either install Gurobi 8, or install the full version of Julia.

@lausilvag
Copy link
Author

I installed Gurobi 8.0.1 and there was no error.

Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants