Closed mmascher closed 1 year ago
I actually started a PR with a similar solution but then I thought that the script is launched during the setup (to test it) and later is designed to be mostly imported but could be also launched and needs to find the Python interpreter.
So I dug more and I found this solution on https://stackoverflow.com/a/60696126/3547046
There are also interesting discussions on using type
, command -v
, etc:
There may still be sites with only python/python2, so
env python3
may fail.gwms-python
should be used. Fixes #349