mkbuildoptglobals.py: assert python version by mcspr · Pull Request #8886 · esp8266/Arduino (original) (raw)

Finally because the env var ESP8266_ARDUINO_PYTHON_PATH will be for this package only, it may be the safest and easiest for users. It can be (semi) permanently set in bashrc in Linux, or its equivalent if using zsh in MacOS and in Windows should be from Control Panel. Because the env var is for our private use and our python launcher will revert back topython3 as the entry point if the env var is not defined, I think this can be the safest solution and simplest to document.

Yes I know in Windows, the package also carries its own copy of python3 executable and DLL. I tested them and I found that they do not run on Win7 without SP1. I also remembered that I somehow manage to download python3 >= 3.7 that will work on plain Win7 (surprisingly Arduino IDE 2.0.x can be made to run in plain Win7).

I am pretty sure that plain Win7 is no longer used widely, but using env var still may provide better flexibility for users with custom python installation path (it should still work in Win10 and 11, right?)