I'm trying to use GAMS in Julia for an optimization problem. I already installed GAMS and was able to use GAMS with python successfully in VScode. However, I kept getting "GAMS executable not found" in Julia. I'm using an M1 chip MacBook.
So in Terminal (Rossetta - as I'm using older GAMS version), I already installed GAMS:
using Pkg
Pkg.add("GAMS")
Then, I use GAMS' CPLEX as optimizer for my model:
using GAMS, JuMP
model = Model(GAMS.Optimizer)
set_optimizer_attribute(model, "Solver", "CPLEX")
set_optimizer_attribute(model, GAMS.Solver(), "CPLEX")
Here, I checked to see if the GAMS systems directory has been added to PATH and it is not, since:
print(ENV["PATH"])
gives me
/usr/bin:/bin:/usr/sbin:/sbin
However, when I run this code in terminal, the GAMS systems directory is already added in PATH:
/Library/Frameworks/GAMS.framework/Versions/34/Resources:/usr/local/bin:/usr/local/sbin:/Users/<name>/.pyenv/shims:/opt/homebrew/bin:/opt/homebrew/sbin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/Library/Frameworks/Python.framework/Versions/3.9/bin:/Applications/FICO Xpress/Xpress Workbench.app/Contents/Resources/xpressmp/bin:/Applications/Julia-1.9.app/Contents/Resources/julia/bin/:/Users/<name>/anaconda3/bin:/Users/<name>/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
Why is that? And how do I make Vscode recognize my PATH above for my Julia code?