mkbuildoptglobals.py: assert python version by mcspr · Pull Request #8886 · esp8266/Arduino (original) (raw)
- So by using
python3.11 -mvenv somewhere
, essentially the whole IDE will run with a modifiedPATH
? Can this introduce problems in the future if somehow the modified path interfere with something else later? - In my opinion using
runtime.tools.python3.path
may not be easy/convenient for all users, but it might be better (safer?) than modifying path for the whole IDE. - Using
platform.local.txt
may be easier than the the 2nd solution above, assuming any modification to the file does not get deleted when the ESP8266 package is updated, but still in POSIX, the.arduino15
directory is meant to be a hidden directory and in Windows the actual locations is long(C:\Users\Name\AppData\so_on_so_forth)
. It may also not endearing to some users.
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?)