-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GAMS is not registered correctly in show-versions #523
Comments
One way to debug this is to put for instance: print(os.environ)
# Execute, capturing stdout
output = check_output(
...
)
print(output) …around the subject code. Setting |
Hi, I recently tried installing message-ix on my Windows machine and am encountering the same issue. In my PowerShell session, running I've restarted VS Code multiple times, and I’ve seen that this issue was also mentioned in #456. Below is the output from my PowerShell session: (messageix_dev) PS V:\Work> message-ix show-versions
'gams' is not recognized as an internal or external command,
operable program or batch file.
ixmp: 3.10.0
message_ix: 3.10.0
message_ix_models: 2024.1.30.dev27+gc22e63d8
c22e63d8 (HEAD -> leap-re-wks, origin/leap-re-wks) update reporting after Rev 1 bug on elec inv
message_data: 0.0.0
d15e6abfa (HEAD -> ssp_dev, origin/ssp_dev) Update shipping emissions and harmonize with CEDS inventories (#601)
click: 8.1.8
dask: 2025.2.0
genno: installed
graphviz: 0.20.3
jpype: 1.5.2
… JVM path: C:\Program Files\Java\jre1.8.0_441\bin\server\jvm.dll
openpyxl: 3.1.5
pandas: 2.2.3
pint: 0.24.4
xarray: 2025.1.2
yaml: 6.0.2
iam_units: installed
jupyter: installed
matplotlib: 3.10.1
plotnine: 0.14.5
pyam: 3.0.0
GAMS: 'gams' executable not in PATH
python: 3.13.2 | packaged by conda-forge | (main, Feb 17 2025, 13:52:56) [MSC v.1942 64 bit (AMD64)]
python-bits: 64
OS: Windows
OS-release: 11
machine: AMD64
processor: AMD64 Family 25 Model 68 Stepping 1, AuthenticAMD
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: ('English_Netherlands', '1252') And here’s the output when I run (messageix_dev) PS V:\Work> gams
--- Job ? Start 03/18/25 16:45:12 49.2.0 9b2b0844 WEX-WEI x86 64bit/MS Windows
***
*** GAMS Base Module 49.2.0 9b2b0844 Mar 5, 2025 WEI x86 64bit/MS Window
***
*** GAMS Development Corporation
*** support@gams.com, www.gams.com
***
*** GAMS Release : 49.2.0 9b2b0844 WEX-WEI x86 64bit/MS Windows
*** Release Date : Mar 5, 2025
*** To use this release, you must have a valid license file for
*** this platform with maintenance expiration date later than
*** Feb 15, 2025
*** System Directory : V:\GAMS\49\
***
*** License : V:\GAMS\49\gamslice.txt
*** Small MUD - 5 User License S240905|0002AP-GEN
*** IIASA, Information and Communication Technologies Dep.
*** DC216 01M5CODICLPTMB
*** License Admin: Melanie Weed-Wenighofer, wenighof@iiasa.ac.at
***
*** Licensed platform : Generic platforms
*** The installed license is valid.
*** Maintenance expiration date (GAMS base module): Nov 29, 2025
*** Note: For solvers, other expiration dates may apply.
*** Status: Normal completion
--- Job ? Stop 03/18/25 16:45:12 elapsed 0:00:00.004 Any ideas or workarounds for ensuring that message-ix correctly picks up the updated PATH in my VS Code/virtual environment on Windows? |
Hi @Wegatriespython, thanks for picking this up :) |
One more clarifying question: why did you restart VSCode multiple times? You said this error occurs in your PowerShell session, so if you need to restart anything to make sure the changes to your |
Lastly, if I remember correctly, this discussion stalled because even though |
I will look into this and return. Ah I was using the integrated terminal in VScode (set to powershell) so I did the restart to ensure the powershell started with a fresh session (tried setting persistent terminal sessions to off). |
Code sample or context
Recently, @behnam-zakeri tried to install message-ix again on a new Linux machine. The process went fine by creating a new virtual environment via virtualenv and virtualenvwrapper and we made sure that the directory for
gams
is in$PATH
. This can be confirmed by runninggams
on the system; it seems to work both from the command line and as part of the westeros_baseline tutorial from message-ix. However, runningtells us that
'gams' is not in PATH
. Since everything else is working fine, my expectation is that this is due to an issue with the way that ixmp tries to findgams
, not about the installation per se.We should note that the Linux machine was not a fresh install. Things like
pip
andvirtualenv
or evenvenv
were missing, which seems odd.Expected result
message-ix show-versions
, which is internally using https://github.com/iiasa/ixmp/blob/d202e019204e6cf979df6f2a827322a00dbd1957/ixmp/model/gams.py#L18C1-L50C20 should find the correct version ofgams
.Problem description
It doesn't seem to find it at all.
Versions
@behnam-zakeri If you can edit this description, please add the output of
message-ix show-versions
here. Otherwise, please just paste it down below.Output of ixmp show-versions
The text was updated successfully, but these errors were encountered: