Hi there, since Apple upgraded MacOS Monterey to 12.3 Arduino is not able to find python - apparently there is no more python 2.7 in MacOS. But installing python 3 and making sure it is in $PATH does not help much - still the problem is: Arduino - or as I was told on Arduino Gighub page - ESP32 part of it, is looking for python and not finding it.
Workaround is to run Arduino directly from terminal rather than GUI - then, there is no problem. But that seems dirty trick and probably could be avoided if ESP32 board manager would behave better. Do you know any solution for that please?
This problem is for both: Arduino 1.8.19/20 and 2.x
Problem starts here:
Merged 25 ELF sections
python /Users/me/Library/Arduino15/packages/esp32/hardware/esp32/2.0.2/tools/gen_esp32part.py -q /var/folders/l2/q1yr15k169z43pw_hczk1ckw0000gn/T/arduino_build_890727/partitions.csv /var/folders/l2/q1yr15k169z43pw_hczk1ckw0000gn/T/arduino_build_890727/82-esp32s-test.ino.partitions.bin
...
exec: "python": executable file not found in $PATH
Error compiling for board ESP32 Dev Module.
Yes, I am having the same problem with Monterey 12.3. I have python 3.8 installed with homebrew. I think the problem is that the links now point to python3. On my system, this is what I see.
ershler@Philips-MacBook-Pro ~ % which python
python not found
ershler@Philips-MacBook-Pro ~ % which python3
/opt/homebrew/opt/python@3.8/bin/python3
ershler@Philips-MacBook-Pro ~ % python3
Python 3.8.12 (default, Oct 22 2021, 17:47:41)
[Clang 13.0.0 (clang-1300.0.29.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
So it's not clear to me how to tell Arduino to use python3.
Hi, got exactly the same problem, unable to re-compile sketches that worked previously... I started Arduino.app from terminal and no more success. How did you start ? Just papio@MBP16M1papio ~ % open /Applications/Arduino.app. ? I put my Arduino.app on desktop not in Application folder..
Yes, but as my Arduino.app remains in /Users/bernardulrich/Downloads.
I start it from there. and I can't find python in my system.
Thus even starting Arduino from Terminal doesn't solve problem.
Any additional advice ? Many Thanks
if it says nothing (as it should since 12.3 MacOS) then enter command: which python3
this one should return the path - if not, first you must install python3
if it returns the path, link them by using command: sudo ln -s /path/displayed/above /usr/local/bin/python
provided /usr/local/bin is in your PATH - check by entering command: echo $PATH
I installed python3 by using brew - you can also install xcode (from appstore)
now make this: sudo ln -s /Library/Frameworks/Python.framework/Versions/3.10/bin/python3 /usr/local/bin/python
after this command try again with which python
Compilation of existing code that successfully compiled in 2021,
1.) when starting with GUI gives an error (lack of python)
2.) and when starting with terminal it gives same error but asks for Command Line Developer Tools install (I tried it several times long minutes... , and being asked again and again after end of compilation, and error).....
I performed Homebrew install, and installed Python 3.9.10... (previous trials were done with 3.10 that seems to be fixed in $PATH).
But always remaining compile error python: error: Failed to locate 'python'.
My setup is
~ % which python
/usr/local/bin/python
close Arduino completely (Command Q), even reboot macos
don't start Arduino from GUI
open terminal
type: open /Applications/Arduino.app
it will start Arduino
it works for me
true, but the thing is not WRONG python (3 instead of 2) but LACK of python - not visible by the environment variables
and I opened the ticket with Arduino - they told me: "Arduino does NOT use python but the manager for ESP uses" so ticket was closed today