1

I have tried to connect my esp32 on my M1 MacBook through the Arduino IDE and I'm getting the following error.

exec: "python": executable file not found in $PATH
Error compiling for board ESP32 Dev Module.

Does anyone have any idea how to fix it? If I run python3 --version in the terminal I get the version which is Python 3.8.9. screenshot

Many thanks in advance (:

Marty SC
  • 13
  • 6
  • I just noticed that it says "python" not found, but you are running "python3". If you run just "python" from the shell, does that work? If not, that might be your problem... – Ture Pålsson Mar 28 '22 at 12:43
  • [Several](https://stackoverflow.com/questions/60762378/exec-python-executable-file-not-found-in-path) [threads](https://forum.arduino.cc/t/exec-python-executable-file-not-found-in-path/971847) on other forums seem to support the python/python3 angle. – Ture Pålsson Mar 28 '22 at 12:47

2 Answers2

1

Open the App via Terminal works:

open /Applications/Arduino.app

compiles without errors

Alex
  • 11
  • 1
0

If the IDE is a GUI application started from the Finder, and your Python binary is in some location that is added to PATH by the shell start-up files (such as .bashrc or .zshrc), then the issue may be that those files don’t take effect for programs started through the Finder (since no shell is involved).

Ture Pålsson
  • 6,088
  • 2
  • 12
  • 15
  • Any idea how to fix that if that is the case? – Marty SC Mar 28 '22 at 12:20
  • 1
    Apple seem intent on changing the Right Way to do this with every OS release, as witnessed by the number of no-longer-working answers to [this question on Ask Different](https://apple.stackexchange.com/questions/51677/how-to-set-path-for-finder-launched-applications). If it's possible to set the path from inside the IDE, that might be the best bet. – Ture Pålsson Mar 28 '22 at 12:36