Heltec WiFi_Kit_series Arduino development framework not working on macos

Hi, I recently used Heltec ESP32 V2 to make a LoRaWan. When I tried to compile my arduino code that is the OTAA example, it shows

exec: "python": executable file not found in $PATH

I’m currently using Macbook pro 2020 M1, Monterey 12.3
I do know that in macos Monterey, it only uses python3, which creates this problem. What I don’t know is how to solve it. Since I need to using the board manager which heltec provided. Is there something that I might have missed?

Hi,
try the following in terminal:

sudo ln -s -f /usr/local/bin/python3 /usr/local/bin/python

Hi Ridvan, Thank you for the reply. I tried your suggestion and here is the result:

exec: "python": executable file not found in $PATH
Error compiling for board WiFi LoRa 32(V2).

It still produces the same error. Do you have any other suggestions?

Check the python3, if it exists. If not find out where your python on Mac is installed.

And remember to restart your Arduino IDE a few times :slight_smile:

Hi Ridvan, I’ve checked the availability of the python and I can confirm that is does exist.

and I’ve checked the location of my python3 using the which command and here’s the result:
image

so i Tried to Change the location in the commands that you gave. This is how I wrote it:

sudo ln -s -f /usr/local/python3 /usr/local/bin/python

and then I tried to restart arduino a few times to check, yet it still produces the same error.

Is there anything I might have missed? thank you again for the reply.

Check out this thread, this may help:

[https://forum.arduino.cc/t/mac-os-update-killed-esp32-sketch/969580/10]

This may help too (installs python 2.7):
brew install python@2
or even

sudo ln -s /Library/Frameworks/Python.framework/Versions/Current /Library/Frameworks/Python.framework/Versions/2.7

I am still trying to find a sustainable solution for me, aswell :unamused:

Hi Ridvan, thank you for the suggestion. I will try the homebrew method since that is the only method I haven’t been trying out yet. I will tell you the result if it works. Thank you so much :grin:

Hi Ridvan, i recently found out you can actually use other platform to develop ESP32. Check this out:

Using this I was able to get a much better compatibility because of how the platformIO works. It already has many IoT devices libraries, the same one you would find in Arduino. Using the LMIC-node I was able to get it working and connected to a gateway without having to thinker with too much stuff. Hope it helps.