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

Gurobi 9.5.0 -- Unable to locate Gurobi installation. Running some common diagnostics #440

Closed
BERENZ opened this issue Dec 5, 2021 · 7 comments

Comments

@BERENZ
Copy link

BERENZ commented Dec 5, 2021

I installed gurobi9.5.0_macos_universal2.pkg for MacOS 11.6.1 (Macbook pro Late 2013, Quad-Core Intel Core i7) and then I wanted to install Gurobi.jl for Julia 1.6.2 as the readme file states that Gurobi.jl supports 9.5.0. So I run the following code:

ENV["GUROBI_HOME"] =  "/Library/gurobi950/macos_universal2"
using Pkg
Pkg.add("Gurobi")
Pkg.build("Gurobi")

and after the build command, I got the following errors listed below. I see that there is information Gurobi.jl only supports the following versions: gurobi91, gurobi90. So is the 9.5.0 supported? To verify I also installed GitHub version of your package and I got the same errors.

ERROR: Error building `Gurobi`:
fatal: error thrown and no exception handler available.
BoundsError(a=Base.BitArray{1}(chunks=Array{UInt64, (1,)}[0x00000000000000ff], len=8, dims=(0,)), i=(Base.UnitRange{Int64}(start=0, stop=4),))
throw_boundserror at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
_simplify_include_frames at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
YY.process_backtraceYY.783 at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
process_backtrace at ./errorshow.jl:825 [inlined]
process_backtrace at ./errorshow.jl:825 [inlined]
show_backtrace at ./errorshow.jl:759
#showerror#760 at ./errorshow.jl:90
showerror##kw at ./errorshow.jl:87
unknown function (ip: 0x147e4d243)
jl_apply_generic at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
#showerror#761 at ./errorshow.jl:96
showerror##kw at ./errorshow.jl:95
unknown function (ip: 0x147e400a3)
jl_apply_generic at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
show_exception_stack at ./errorshow.jl:877
display_error at ./client.jl:104
unknown function (ip: 0x147e3dffb)
jl_apply_generic at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
display_error at ./client.jl:107
jl_apply_generic at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
jl_f__call_latest at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
_start at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
jfptr__start_45086 at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
jl_apply_generic at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
true_main at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
repl_entrypoint at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
ERROR: LoadError: Unable to locate Gurobi installation. If the advice above did not help,
open an issue at https://github.com/jump-dev/Gurobi.jl and post the full
print-out of this diagnostic attempt.

**Unable to locate Gurobi installation. Running some common diagnostics.**

Gurobi.jl only supports the following versions:

 - gurobi91
 - gurobi90

Did you download and install one of these versions from gurobi.com?
Installing Gurobi.jl via the Julia package manager is _not_ sufficient!

Found GUROBI_HOME =  /Library/gurobi950/macos_universal2

Does this point to the correct install location?

We're going to look for the Gurobi library in this directory:
    /Library/gurobi950/macos_universal2/lib

That directory has the following files:

 - /Library/gurobi950/macos_universal2/lib/gurobi-javadoc.jar
 - /Library/gurobi950/macos_universal2/lib/gurobi.jar
 - /Library/gurobi950/macos_universal2/lib/gurobi.py
 - /Library/gurobi950/macos_universal2/lib/gurobi95.netstandard20.dll
 - /Library/gurobi950/macos_universal2/lib/gurobi95.netstandard20.xml
 - /Library/gurobi950/macos_universal2/lib/libGurobiJni95.jnilib
 - /Library/gurobi950/macos_universal2/lib/libgurobi95.dylib
 - /Library/gurobi950/macos_universal2/lib/libgurobi95_light.dylib
 - /Library/gurobi950/macos_universal2/lib/libgurobi_c++.a
 - /Library/gurobi950/macos_universal2/lib/python2.7
 - /Library/gurobi950/macos_universal2/lib/python3.10
 - /Library/gurobi950/macos_universal2/lib/python3.7
 - /Library/gurobi950/macos_universal2/lib/python3.8
 - /Library/gurobi950/macos_universal2/lib/python3.9
 - /Library/gurobi950/macos_universal2/lib/rootcert.pem

We were looking for (but could not find) a file named like
`libgurobiXXX.so`, `libgurobiXXX.dylib`, or `gurobiXXX.dll`.


You should set the `GUROBI_HOME` environment variable to point to the
install location then try again. For example (updating the path to the
correct location if needed):

# On Windows, this might be
ENV["GUROBI_HOME"] = "C:\\Program Files\\gurobi910\\win64\\"
import Pkg
Pkg.add("Gurobi")
Pkg.build("Gurobi")

# On OSX, this might be
ENV["GUROBI_HOME"] = "/Library/gurobi910/mac64/"
import Pkg
Pkg.add("Gurobi")
Pkg.build("Gurobi")

# On Unix, this might be
ENV["GUROBI_HOME"] = "/opt/gurobi910/linux64/"
import Pkg
Pkg.add("Gurobi")
Pkg.build("Gurobi")

**Note: your path may differ. Check which folder you installed the Gurobi
binary in, and update the path accordingly.**
@odow
Copy link
Member

odow commented Dec 5, 2021

You must be running an old version of Gurobi. Please update:

import Pkg; Pkg.update()

If you run

Pkg.status()

You should see Gurobi v0.10.1.

Remember to restart Julia after updating for the changes to take effect.

@PythonNut
Copy link

I assume people are running into this problem because MathOptInterface is blocking the upgrade to v0.10.1

@odow
Copy link
Member

odow commented Dec 6, 2021

Ah, probably. You can only use Gurobi 9.5 on the most recent release of JuMP (v0.22).

@BERENZ
Copy link
Author

BERENZ commented Dec 6, 2021

Ok, so I did the following

] add MathOptInterface

and got

   Updating registry at `~/.julia/registries/General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
┌ Warning: Some registries failed to update:
│     — /Users/berenz/.julia/registries/General — failed to fetch from repo
└ @ Pkg.Types /Applications/Julia-1.6.app/Contents/Resources/julia/share/julia/stdlib/v1.6/Pkg/src/Types.jl:1246
   Resolving package versions...
    Updating `~/git/uczelnia/ewaluacja-optymalizacja/Project.toml`
  [b8f27783] + MathOptInterface v0.9.22

Then I restarted julia and forced to use the newest version of JuMP

] add JuMP#master

and got

   Updating git-repo `https://github.com/jump-dev/JuMP.jl.git`
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package MathOptInterface [b8f27783]:
 MathOptInterface [b8f27783] log:
 ├─possible versions are: 0.5.0-0.10.3 or uninstalled
 └─restricted to versions 0.10.4-0.10 by JuMP [4076af6c] — no versions left
   └─JuMP [4076af6c] log:
     ├─possible versions are: 0.22.1 or uninstalled
     └─JuMP [4076af6c] is fixed to version 0.22.1

Here's the list of packages that I am using in this project

  [8be319e6] Chain v0.4.8
  [a93c6f00] DataFrames v1.2.2
  [1313f7d8] DataFramesMeta v0.10.0
  [864edb3b] DataStructures v0.18.10
  [da1fdf0e] FreqTables v0.4.5
  [2e9cd046] Gurobi v0.9.14
  [7073ff75] IJulia v1.23.2
  [b6b21f68] Ipopt v0.7.0
  [4076af6c] JuMP v0.21.10
  [b8f27783] MathOptInterface v0.9.22
  [86f7a689] NamedArrays v0.9.6
  [b98c9c47] Pipe v1.3.0
  [fdbf4ff8] XLSX v0.7.8

and my session info

Julia Version 1.6.2
Commit 1b93d53fc4 (2021-07-14 15:36 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin18.7.0)
  CPU: Intel(R) Core(TM) i7-4850HQ CPU @ 2.30GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, haswell)

@odow
Copy link
Member

odow commented Dec 6, 2021

No, you need add [email protected].

Try

] rm JuMP MathOptInterface Gurobi Ipopt
] up
] add JuMP Gurobi Ipopt

@odow
Copy link
Member

odow commented Dec 16, 2021

Did you resolve this problem?

@odow
Copy link
Member

odow commented Feb 3, 2022

Closing as stale. Please install the latest version of Gurobi.jl.

@odow odow closed this as completed Feb 3, 2022
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