I’m trying to use the Julia REPL but having a library path problem.
Oddly, the same code works just fine with bash/terminal (right-hand side), but an error occurs with REPL (left-hand side):
Can anyone let me know how to resolve this issue?
@odow Thank you for your reply. Yes, I have only one Julia version installed on my mac.
Here is what I get when I ran Pkg.build("Gurobi") on the VScode Julia REPL:
julia> Pkg.build("Gurobi")
Building Gurobi → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/aac05324d46b53289ccb05510b05b4a56ffd3ed5/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/jump-dev/Gurobi.jl and post the full
print-out of this diagnostic attempt.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] top-level scope
@ ~/.julia/packages/Gurobi/BAtIN/deps/build.jl:165
[3] include(fname::String)
@ Base.MainInclude ./client.jl:444
[4] top-level scope
@ none:5
in expression starting at /Users/jipkim/.julia/packages/Gurobi/BAtIN/deps/build.jl:159
**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!
As a matter of fact, it is not only GUROBI but also Ipopt+HSL. They work well on the bash terminal, but VScode REPL returns an error message (e.g. dlopen(libhsl.dylib, 2): image not found).
I just found out that, Julia REPL enters a different environment as soon as I start it by (cmd + shift + p -> Julia: Start REPL). Then it is on “(directory name)” environment, not “(@v1.6)”
On Julia REPL, if I type ] and status, then:
(JuMP_examples) pkg> status
Status `~/Dropbox/Julia/JuMP_examples/Project.toml` (empty project)
On regular terminal, if I type ] and status, then: