Arduino 2.0 rc-3 NodeMCU compile can't find python3

Hi,

New user to the new IDE,

Version: 2.0.0-rc3
Date: 2021-12-22T15:45:34.768Z
CLI Version: 0.20.2 [13783819]

Copyright © 2022 Arduino SA

running on a Mac, Catalina 10.15.7.

I'm having an issue with the sketch > verify/compile option using a NodeMCU 1.0 (ESP-12E), when I do the compile I see the following "Compilation error: fork/exec {runtime.tools.python3.path}/python3: no such file or directory}"

Where in the IDE is the path to Python set?

Thanks!

Your post was MOVED to its current location as it is more suitable

Hi just looked at the compilation log and saw that the compiler apparently is looking at the root directory for python3, it's not there and it never should be there...

/python3 -I /Users/fischp/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/signing.py --mode header --publickey /Users/fischp/Documents/Arduino/heroMotorController_MQTT_v1.0/public.key --out /private/var/folders/ky/lwqr1wg57y5f35rtz75lq9jw0000gn/T/arduino-sketch-7EA7F7B7637B884A898A45F8C436B379/core/Updater_Signing.h
Using library PubSubClient at version 2.8 in folder: /Users/fischp/Documents/Arduino/libraries/PubSubClient
Using library ESP8266WiFi at version 1.0 in folder: /Users/fischp/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi
Compilation error: fork/exec /python3: no such file or directory}

The short answer is that the installation should be here:

/Users/fischp/Library/Arduino15/packages/esp8266/tools/python3/3.7.2-post1/

This part of the error: {runtime.tools.python3.path} is the reference to the property that is programmatically set to the path above by the Arduino IDE. The fact that it was not expanded indicates that the path does not exist, which can happen if something goes wrong during the installation of the esp8266 Arduino boards platform via the Arduino IDE Boards Manager.

I will suggest you try uninstalling and then reinstalling this platform in hopes it was only a transient failure and you'll get a good installation this time around.

Please try this:

  1. Select Tools > Board > Boards Manager from the Arduino IDE's menus to open the Boards Manager view in the side panel.
  2. Scroll down through the list of boards platforms until you see "esp8266 by ESP8266 Community". Click on it.
  3. Hover the mouse pointer over the "INSTALLED" label.
    You will see it change to "UNINSTALL". Even though it doesn't really look like one, this is a button.
  4. Click the "UNINSTALL" button.
  5. An Uninstall confirmation dialog will now open. Click the Yes button.
  6. Wait for the uninstallation to finish.
  7. Once again, click on "esp8266 by ESP8266 Community" in the Boards Manager view
  8. Select "3.0.2" from the dropdown version menu to the left of the Install button.
  9. Click the Install button.
  10. Wait for the installation to finish.

Now try compiling you sketch again. Hopefully the error will be fixed.

ptillisch,

Thank you so much for the instructions! The uninstall and reinstall worked fine and my code now compiles without issue!

I did notice that after I completed the uninstall and scrolled to the esp entry in the board manager the default version was 3.0.1, not the 3.0.2 you suggested. I selected version 3.0.2 as you indicated and completed the install. I'm not sure if there's an issue with 3.0.1 but the issue is fixed.

Thank you again for you assistance.

You are welcome. I'm very glad to hear the uninstall/reinstall technique fixed the bad installation.

Yeah, I ran into the same thing while developing the instructions I shared above. That was the reason I added step (8). This is due to a bug in the Arduino IDE 2.x:

Hopefully that will be resolved in an upcoming release of the IDE. Fortunately, uninstalling and then reinstalling a platform or library is probably not done by very many IDE users.