Error 'exec: "python": executable file not found in $PATH Error compiling for board AI Thinker ESP32-CAM.' in Arduino IDE 1.8.12 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.
&gt;&gt;&gt; 
KeyboardInterrupt
&gt;&gt;&gt; 


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 &gt; File &gt; Preferences &gt; Settings &gt; Additional Boards Manager URLs: &gt; https://dl.espressif.com/dl/package_esp32_index.json


Then I added the libraries for all ESP32 boards:

Arduino IDE &gt; Tools &gt; Board &gt; Boards Manager &gt; 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 &gt; Tools &gt; Board &gt; 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 ?
All right so I was able to fix the problem. The Arduino IDE I was using had been installed from the Ubuntu Software Center. I uninstalled it.

Then I reinstalled the Arduino IDE by downloading it from the www.arduino.cc website and doing a manual install in /opt. Now it works awesome.