I am getting an error toward the end of the compile that when run in terminal executes flawlessly.
Compiling sketch...
/Users/Larry/Library/Arduino15/packages/esp8266/tools/python3/3.7.2-post1/python3 /Users/Larry/Library/Arduino15/packages/esp8266/hardware/esp8266/2.7.1/tools/signing.py --mode header --publickey /Users/Larry/Documents/Arduino/Blink/public.key --out /var/folders/c5/qdbyt1_n2731l7vq4fcx7hd80000gp/T/arduino_build_864600/core/Updater_Signing.h
env: python3: No such file or directory
exit status 127
Error compiling for board Generic ESP8266 Module.
Yet, if I copy that same command into a Terminal window and execute it, it completes successfully.
I am using the latest version 1.8.12 and all boards and libraries have been updated to the lastest versions.
I am compiling on MAC OS High Sierra.
I have not had any issues compiling modules for Arduino UNO, but when I try to compile the most basic examples such as Blink for any of the ESP8266 boards, they all produce this error.
The problem is the ESP8266 platform has a tool dependency on Python 3, but rather than installing a dedicated copy of Python 3 with the package, the ESP8266 platform developers assume you have Python 3 already installed at /usr/local/bin/python3.
The python3 file at the path shown in the error message if you enable verbose output during compilation is just a symlink to that location. So either you have Python 3 installed somewhere else, like /usr/bin/python3, or maybe you don't have Python 3 installed at all. If the former, you need to modify the symlink, as described here. If the latter, you need to install Python (and possibly modify the symlink as well if it was installed to a location other than /usr/local/bin/python3.
You don't have to put your python codes in a global path. Just make your python 3.4 interpreter interpreter available globally. For that, edit .bash_profile or .bashrc file in your home directory and add the following line:
export PATH=${PATH}:/usr/bin/python3
That will make python3 executable irrespective of your current working directory. In order to execute code from your codes directory, you just have to write: UPSers
$ python3 ./your_code.py
Another way is to add the shebang at the top of your code as
#/usr/bin/python3
and change the permission to executable by the current user (by default it will not have execute permission).