This error occurs because some of the code used to configure the ESP boards references "python." Most modern Unix-based OSes (Mac and Linux) only come with python3 and will not recognize the "python" command, resulting in the error above.
You can verify that your system does not recognize the "python" command by running the following on your terminal. This should not display any output.
- If you are on an Ubuntu distribution, you can use the "python-is-python3" package that automatically creates the links and fixes system references to use python3 whenever it comes across the "python" command. Use the following command to install it.
sudo apt install python-is-python3
- If you are on a different distribution or using MacOS, you need to find "platform.txt" files under your ESP32 installation directory and change all references to "python" to use "python3" instead.
Finally, you can try installing Python 2.x on your computer, but be aware that Python 2.x is not a supported Python version anymore, and might cause other issues.