Reputation: 307
since the last update to Mac OS Monterey 12.3 I get the following error message when compiling my Arduino sketch:
exec: "python": executable file not found in $PATH
Unfortunately, I have not yet been able to find out how to solve this problem.
I would be very grateful for ideas and suggestions.
Upvotes: 6
Views: 25073
Reputation: 639
In MacOS 12.3 Apple removed python2.7 (python
) from MacOS.
What I did to solve this is link python3
to python
, I wouldn't recommend it because it's sus, I would recommend you wait until Arduino IDE fixes this issue in a later build. For the time being, you could try their Web IDE: Arduino Editor
However, here are the instructions to link python3
to python
:
If you don't have python3
installed, install it here in the link below:
Find your path for the current version of python3
you're using
which python3
it'll show up with something like this:
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3
Copy that and use it to run this command that links python 3
to python
. Replace the first file path with where your python3
is.
ln -s -f INSERT_PATH_OF_PYTHON3 /usr/local/bin/python
for example:
ln -s -f /Library/Frameworks/Python.framework/Versions/3.10/bin/python3 /usr/local/bin/python
Upvotes: 16
Reputation: 181
Four steps are needed:
Install python3 using i.e. Brew:
brew install python
python3 is in:
/opt/homebrew/bin/python3
Link Python to python3:
sudo ln -s /opt/homebrew/bin/python3 /opt/homebrew/bin/python
Check if you can execute it from the terminal; i.e.,
python --version
Irrespective of whether you use python --version
or python3 --version
, it should show python 3 now.
Open terminal and execute:
open /Applications/Arduino.app
It works in my case. It looks like when Arduino is executed from the GUI, it does not read the $PATH
properly, so although python is linked to python3, it does not find it.
Upvotes: 17