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

Hi everybody,
I recently bought ESP-WROOM-32
but, I am not able to compile code for it
& the below ERROR message is seen

Arduino: 1.8.19 (Linux), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"

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

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

and also I am unable to find 'ESP-WROOM-32' in board selector of ARDUINO

please help :upside_down_face:

Update the boards menu from file>preferences

Hi Jremington,

How can I do it

Use the phrase "arduino update boards menu" with your favorite search engine.

There may not be one with the exact name "ESP-WROOM-32" but others, like "ESP32 dev module" will probably work. Try a few and check the listed specifications against those for your module.

Ok
Thanks for your HELP :grinning:

Hey,

My Board menu is updated
but still the same error............

see this for how we solved it on a Mac

may be it's similar on linux and you need a direct call to python3

Hey J-M-l
Thanks for your support

but

:face_with_diagonal_mouth:
MAC commands are not supported in LINUX

sed certainly does run under linux. You may have to install it.

Type sed on the command line and tell us what you see.

Mac is running Unix under the hood (trademarked), open a terminal and you can enter the same commands.
file locations will differ and you need to make sure this is really the problem you face before you change all the python into python3 in your platforms :slight_smile:

sed: can't read /home/sandeep/Library/Arduino15/packages/esp32/hardware/esp32/*/platform.txt: No such file or directory

So, sed is installed and running!

Do you have a user named "sandeep" on your linux system?

yeah, as mentioned your file location will be different
it's likely a hidden folder like home/{username}/.arduino15

BUT PLEASE MAKE SURE THIS IS THE ISSUE AT HAND BEFORE APPLYING THE CHANGES (or make a back up of these files)

what do you see if you run

ls -al /home/sandeep/.arduino15/

and

ls -al /home/sandeep/.arduino15/packages

There is an explicit list of the Linux files and changes in this post: https://github.com/espressif/arduino-esp32/issues/4717#issuecomment-1070801525

You should be able to use your text editor of choice and make these changes.

"sed" is just an efficient but somewhat obscure way to do the same thing (welcome to Linux! :slight_smile: ) in one line.

for ls -al /home/sandeep/.arduino15/

total 26620
drwxr-xr-x 1 sandeep sandeep      400 Jun 30 20:45 .
drwxr-xr-x 1 sandeep sandeep     1794 Jun 30 19:45 ..
drwxr-xr-x 1 sandeep sandeep      180 Jun 20 22:00 cache
-rw-rw-r-- 1 sandeep sandeep 26423265 Jun 29 08:15 library_index.json
-rw-rw-r-- 1 sandeep sandeep      543 Jun 29 08:15 library_index.json.sig
drwxr-xr-x 1 sandeep sandeep       30 Aug 16  2021 logs
-rw-rw-r-- 1 sandeep sandeep    24504 Jun 30 20:45 package_esp32_index.json
-rw-rw-r-- 1 sandeep sandeep   159588 Jun 30 20:45 package_esp8266com_index.json
-rw-rw-r-- 1 sandeep sandeep   514288 Jun 30 20:45 package_index.json
-rw-rw-r-- 1 sandeep sandeep      543 Jun 30 20:45 package_index.json.sig
drwxr-xr-x 1 sandeep sandeep       24 Jun 21 19:19 packages
-rw-rw-r-- 1 sandeep sandeep   111323 Jun 20 22:00 package_spacehuhn_index.json
-rw------- 1 sandeep sandeep     9461 Jun 30 19:33 preferences.txt
drwxr-xr-x 1 sandeep sandeep       34 Aug 31  2021 staging

& for ls -al /home/sandeep/.arduino15/packages its

total 0
drwxr-xr-x 1 sandeep sandeep  24 Jun 21 19:19 .
drwxr-xr-x 1 sandeep sandeep 400 Jun 30 20:45 ..
drwxrwxr-x 1 sandeep sandeep  26 Jun 21 19:19 esp32
drwxr-xr-x 1 sandeep sandeep  26 Aug 16  2021 esp8266

OK

make a copy of

/home/sandeep/.arduino15/packages/esp32

then issue that command

sed -i -e 's/=python /=python3 /g' ~/.arduino15/packages/esp32/hardware/esp32/*/platform.txt

that's the same command as for the Mac, but using ~/.arduino15 as the target directory

I found the solution while browsing on the Internet

sudo usermod -a -G dialout $USER && sudo apt-get install git && wget https://bootstrap.pypa.io/get-pip.py && sudo python3 get-pip.py && sudo pip3 install pyserial && mkdir -p ~/Arduino/hardware/espressif && cd ~/Arduino/hardware/espressif && git clone https://github.com/espressif/arduino-esp32.git esp32 && cd esp32/tools && python3 get.py

just PASTE above command lines in LINUX TERMINAL.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.