gdx-pandas icon indicating copy to clipboard operation
gdx-pandas copied to clipboard

Should GamsDirFinder prefer where/which gams to environment variable values?

Open elainethale opened this issue 5 years ago • 2 comments

Currently GamsDirFinder.__find_gams looks for GAMS in this order:

  • GAMS_DIR environment variable
  • GAMSDIR environment variable
  • where / which gams
  • default install location (Windows only)

Should where/which gams come first? This would change behavior/break interface, but might be more aligned with expected behavior, in that GamsDirFinder would find the version of GAMS that is also found by the command line by default.

elainethale avatar Sep 10 '20 16:09 elainethale

I think it is a good idea. I trust PATH more than GAMSDIR.

jebob avatar Oct 30 '20 15:10 jebob

Should also consider speed, subprocess into where/which might be slower.

EDIT 2023-05-17: I no longer think that this will be a significant slowdown compared to anything else.

jebob avatar Feb 23 '21 11:02 jebob