Open glatterf42 opened 8 months ago
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 PATH
can have some subtleties. For instance, if setting the value in .profile or a similar file, the value will appear in all new terminals opened after that addition. But if one has a terminal open prior, and does not do anything in it, then its prior value of PATH
is not automatically updated.
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
``` ```