Install Gurobi in Mac JuliaPro

Hi there,

I am a new JuliaPro user in Mac OS. I tried to install/build Gurobi but the error raised as it cannot locate the Gurobi installation. In JuliaPro I cannot do “export GUROBI_HOME=”/Library/gurobi800/mac64" like in the terminal. Then how can I tell my JuliaPro the location of Gurobi?

BTW I’ve already got the academic license of Gurobi and it worked well when I opened the terminal version of Gurobi. The Gurobi version is 8.0.1 and the JuliaPro version is 1.0.1.1.

Thanks in advance!
Gabriel

You just need to set your system environment variable for GUROBI_HOME (if it isn’t already). You can check what it is set to by

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

You might also be runing into https://github.com/JuliaOpt/Gurobi.jl/issues/169. In which case, wait for https://github.com/JuliaOpt/Gurobi.jl/pull/170 to be merged and a new release tagged.

If it’s urgent, follow the instructions here (if it works, please report back :slight_smile:):
https://github.com/JuliaOpt/Gurobi.jl/issues/169#issuecomment-438044950

Thank you for your reply!

Can you tell me where to run the command “ENV[“GUROBI_HOME”]”? In your figure it seems to be run in the original julia> command line, but it showed:


And it also did not work in the pkg> command line.

Another issue is, Gurobi can be well installed and built if I use the Anaconda Julia 1.0.1, since I can easily do “export GUROBI_HOME=”/Library/gurobi800/mac64” there. So I think if it can work fine with Gurobi 8.0.1 and Conda/Julia 1.0.1, then it may not be the issue reported in the link.

Thanks!

The KeyError means that the GUROBI_HOME environment was not set in the shell from which you started Julia. So just set it before starting Julia (probably just add the export GUROBI_HOME=... call to ~/.bash_profile so it’s done automatically).

(See PSA: how to quote code with backticks for how to properly format code in Discourse by the way).