I am trying to upload a sketch to the ESP32-CAM board using Arduino IDE 1.8.12 and I get an error message:
exec: "python": executable file not found in $PATH
Error compiling for board AI Thinker ESP32-CAM.
My OS is Ubuntu 18.04.4.LTS.
When I type python in the console, it does open python:
$ python
Python 2.7.17 (default, Nov 7 2019, 10:07:09)
[GCC 7.4.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
KeyboardInterrupt
>>>
Also python is in one of the directories referenced by PATH:
$ which python
/usr/bin/python
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
I added an additional URL referring to the ESP32 boards on the Espressif website:
Arduino IDE > File > Preferences > Settings > Additional Boards Manager URLs: > https://dl.espressif.com/dl/package_esp32_index.json
Then I added the libraries for all ESP32 boards:
Arduino IDE > Tools > Board > Boards Manager > esp32 version 1.0.4
(I tried with version 1.0.3 and it didn't change anything...)
I selected my board in the interface:
Arduino IDE > Tools > Board > AI Tinker ESP32-CAM
I granted all permissions to the USB port:
sudo chmod a+rwx /dev/ttyUSB0
ls -la /dev/ttyUSB0
crwxrwxrwx 1 root dialout 188, 0 Mar 4 21:25 /dev/ttyUSB0
My sketch is really simple:
void setup() {
}
void loop() {
}
I get the same error for any example sketch and for any ESP32 board.
Any idea how this could be fixed ?