I'm new to Pyomo and have a bit of experience with GAMS. I want to use Pyomo with GAMS. I'm using a M1 chip Mac and using anaconda to run python with Spyder. I have installed GAMS by checking 'add to PATH'. I have pyomo installed in the base anaconda environment. When I run a pyomo model with gams with the following code:
solver = SolverFactory('gams:ipopt')solver.solve(model, tee=1)
But get the error:
NameError: No 'gams' command found on system PATH - GAMS shell solver functionality is not available.
I have GAMS v43 and Python 3.10.8.
- I checked that GAMS executable file is accessible from the terminal py running 'gams'.
- I have tried checking the location of GAMS and it is included in the PATH.
- I added the GAMS location using Spyder's Python path manager.
- I added the GAMS location inside the code with
os.environ['PATH'].
- I used
solver = SolverFactory('gams:ipopt', solver_io='gams', add_options=['sysDir=/Library/Frameworks/GAMS.framework/Versions/43/Resources'])
I'm not very knowledgeable with these kind of stuff so I may have done redundant or useless stuff. I know there are other solvers but I need to use GAMS specifically. Could you please help?