IDE compiling error- "fork/exec {runtime.tools.python3.path}/python3: no such file or directory Error compiling for board Generic ESP8266 Module."

I am trying to make a D1 mini receive data on its input pins and send it to the serial monitor.

I think they are broken but picked them out of the bin for a last try.

For two weeks the test sketch compiled and was said to have been successfully uploaded but this morning both IDEs 1.8.19 and 2.3.6 spat out this compiling error

fork/exec {runtime.tools.python3.path}/python3: no such file or directory
Error compiling for board Generic ESP8266 Module.

The sketch compiled fine a couple of days earlier. BUT I had made the fatal error of updating my libraries for both IDEs between the sketch verifying and today. So I deleted the Libraries in [Myname]/Documents/Arduino/ and recovered the contents of the folder from a backup. It made no difference. So I deleted the contents of [Myname]/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/libraries and restored that from a backup.

This still did not force it to revert to its behaviour before the weekend.

I have searched my computer for “python” and remarkably I still have python3 installed. Its directory is python3.9 in the structure of “Pycharm projects”. This is from before I used Arduinos, I have not knowingly installed another python3 for the IDE.

Has anybody got a scooby of how to make either (or both) IDEs behave in the same way they did three days ago?

Or a suggestion of how to hack the directory structure of my iMac so that Arduino IDE can see what my mk1 eyeball can?

Or has the butterfly flapped its wings and in doing so removed all ESP functionality from my stupidly-expensive-and-not-worth-a-fraction-of-the-cost computer?

I am running an m3 iMac with Sequoia (15.6). It has 16GB RAM and plenty of disk space.

Thank you in advance for your suggestions.

Oh the sketch..using the esp library for the DHT11, and added the pinMode() in case it would force the D1 to return any value other than “nan” to the serial monitor )it didn’t). But my priority ids no longer to luck the board type and port combo but to get it to compile at all.

#include "DHTesp.h"
 
DHTesp dht;
 
void setup() {
    Serial.begin(115200);
    dht.setup(3, DHTesp::DHT11);
    pinMode(3, INPUT);
}
 
void loop() {
    float h = dht.getHumidity();
    float t = dht.getTemperature();
 
    Serial.print("{\"humidity\": ");
    Serial.print(h);
    Serial.print(", \"temp\": ");
    Serial.print(t);
    Serial.print("}\n");
 
    delay(2000);
}

Thanks.

Just start with a fresh download of the Apple Silicon IDE, install it and add the esp8266 boards entry to the prefs Additional URL box

(https://arduino.esp8266.com/stable/package_esp8266com_index.json)

ALSO make sure Rosetta2 is installed. It is needed for various toolchain apps.

Thank you. I will do that.

OK

So far I have

Deleted the IDE and reinstalled it.

\No soljution

tried to install python using terminal.

No solution.

Found the python directory that had been in place since June this tear.

Problem probably not missing python3.

tried to edit the plist in the Arduino application to add a KEY withe the path to actual python3 directory.

This prevented the IDE from accessing the Arduino Library in Myname/Documents/Arduino

Removing the new made no difference.

So I deleted the contents of myname/Library/Arduino15, and reinstalled the directory from a backup.

This returned me to the python3 error.

Before I did this I spent an hour on the phone to Apple support, a lot of the time trying to explain why I was not trying to download python3.13 into Applications (where there were two versions of python 3.x, because the error was specifically about python3, an element in the /usr/directory tree in the root of the McintoshHD using the command line to get python3.13 into the /usr/local/ structure because that is what everyone in forums dedicated to this issue had suggested (there is a shortcut named python3 to an existing python3.x application via another shortcut in a second directory structure). He told me Apple did not support third party applications to which I replied that I was trying to edit the path using Xcode, which I thought was an Apple application.

So I have wasted hours on trying to use command line commands to change the PATH so that python3 can be seen by the Arduino IDE but none of the posts confidently publishing them have produced an answer. Neither IDEs -1.8.19 nor 2.3.6 have a PATH key in their info.plist, both applications worked fine before the OS upgrade.

This trouble started after I had upgraded my OS to Sequoia 15.6. Because Apple are determined to destroy their reputation and customer base, they no longer allow any user to roll their OS back to a previous version…… the OS is not captured in Time Machine and Apple does not offer intermediate OS versions on their site- if you don’t like OS 15.6 you have to go back all the way to 14.the last one and hope that your emails will be visible to an older Mail App.

1- Does anybody know anything about the PATH business referred in other forums?

2- Is there an actual help contact with the Arduino developers as Apple have washed their hands of every product that is not unsold in one of their stores?

Thanks in advance

Hi @fritigern

The file should be located at the following path on your hard drive:

/Users/<username>/Library/Arduino15/packages/esp8266/tools/python3/3.7.2-post1/python3

(Where <username> is your macOS username)

That is not relevant. When you install the "esp8266" boards platform using the Arduino IDE Boards Manager, a dedicated copy of Python is installed. That Python installation is used when you upload a sketch to an ESP8266 board. Other Python installations that happen to be present on your computer will not be used.

The "fork/exec {runtime.tools.python3.path}/python3: no such file or directory" error indicates that dedicated installation of Python is missing on your computer. Arduino IDE automatically replaces the {runtime.tools.python3.path} placeholder in the command with the actual path of the platform's Python tool installation, if such an installation exists.

The question is: why is the Python installation missing? It is possible that some security/antivirus software you have running on your computer is detecting the Python installation as potential malware and quarantining it.

Deleting that specific folder won't help because that is not where the Python installation is located.

Try this:

  1. Select Tools > Board > Boards Manager... from the Arduino IDE menus to open the "Boards Manager" view in the left side panel.
  2. Find the "esp8266" entry in the list of boards platforms.
  3. Hover the mouse pointer over the "esp8266" entry.
    You will see a ●●● icon appear at the top right corner of the entry.
  4. Click the ●●● icon.
    A menu will open.
  5. Select "Remove" from the menu.
    An "Uninstall" dialog will open.
  6. Click the "YES" button in the "Uninstall" dialog.
    The dialog will close.
  7. Wait for the uninstall process to finish, as indicated by a notification at the bottom right corner of the Arduino IDE window:

    Successfully uninstalled platform ...

  8. Click the "INSTALL" button at the bottom of the "esp8266" entry.
  9. Wait for the installation process to finish, as indicated by a notification at the bottom right corner of the Arduino IDE window:

    Successfully installed platform ...

Now try uploading a sketch to your board once again. Hopefully this time it will be successful.

It is likely outdated or irrelevant information. I seem to remember that years ago the "esp8266" platform relied on there being a suitable existing system installation of Python, and that installation being accessible via the system PATH. However, this was found to be quite challenging for the average Arduino user to manage, so the developers of the "esp8266" platform switched to providing a dedicated installation of Python as part of the Boards Manager installation so that it doesn't have any external dependencies.