Error compiling for ESP32-Cam

Hi All,

I have this problem I can't find any info about, if there is info I'm overlooking it cause I don't know what I'm actually looking for.

Anyway, I'm trying to program an ESP32-CAM with the Arduino IDE like this:

My system:
-- Windows 7, 32bit
-- Arduino IDE 1.8.12
-- Python 3.7

I'm getting this error when trying the CameraWebServer example:

C:\Program Files\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files\Arduino\hardware -hardware C:\Users\JohnDoe\AppData\Local\Arduino15\packages -tools C:\Program Files\Arduino\tools-builder -tools C:\Program Files\Arduino\hardware\tools\avr -tools C:\Users\JohnDoe\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files\Arduino\libraries -libraries C:\Users\JohnDoe\Documents\Arduino\libraries -fqbn=esp32:esp32:esp32cam:CPUFreq=240,FlashMode=qio,FlashFreq=80 -vid-pid=0403_6001 -ide-version=10812 -build-path C:\Users\WOUTER~1\AppData\Local\Temp\arduino_build_157495 -warnings=none -build-cache C:\Users\WOUTER~1\AppData\Local\Temp\arduino_cache_280729 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.xtensa-esp32-elf-gcc.path=C:\Users\JohnDoe\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0 -prefs=runtime.tools.xtensa-esp32-elf-gcc-1.22.0-97-gc752ad5-5.2.0.path=C:\Users\JohnDoe\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0 -prefs=runtime.tools.esptool_py.path=C:\Users\JohnDoe\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\3.0.0 -prefs=runtime.tools.esptool_py-3.0.0.path=C:\Users\JohnDoe\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\3.0.0 -prefs=runtime.tools.mkspiffs.path=C:\Users\JohnDoe\AppData\Local\Arduino15\packages\esp32\tools\mkspiffs\0.2.3 -prefs=runtime.tools.mkspiffs-0.2.3.path=C:\Users\JohnDoe\AppData\Local\Arduino15\packages\esp32\tools\mkspiffs\0.2.3 -verbose C:\Users\JohnDoe\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.5\libraries\ESP32\examples\Camera\CameraWebServer\CameraWebServer.ino
C:\Program Files\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files\Arduino\hardware -hardware C:\Users\JohnDoe\AppData\Local\Arduino15\packages -tools C:\Program Files\Arduino\tools-builder -tools C:\Program Files\Arduino\hardware\tools\avr -tools C:\Users\JohnDoe\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files\Arduino\libraries -libraries C:\Users\JohnDoe\Documents\Arduino\libraries -fqbn=esp32:esp32:esp32cam:CPUFreq=240,FlashMode=qio,FlashFreq=80 -vid-pid=0403_6001 -ide-version=10812 -build-path C:\Users\WOUTER~1\AppData\Local\Temp\arduino_build_157495 -warnings=none -build-cache C:\Users\WOUTER~1\AppData\Local\Temp\arduino_cache_280729 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.xtensa-esp32-elf-gcc.path=C:\Users\JohnDoe\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0 -prefs=runtime.tools.xtensa-esp32-elf-gcc-1.22.0-97-gc752ad5-5.2.0.path=C:\Users\JohnDoe\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0 -prefs=runtime.tools.esptool_py.path=C:\Users\JohnDoe\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\3.0.0 -prefs=runtime.tools.esptool_py-3.0.0.path=C:\Users\JohnDoe\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\3.0.0 -prefs=runtime.tools.mkspiffs.path=C:\Users\JohnDoe\AppData\Local\Arduino15\packages\esp32\tools\mkspiffs\0.2.3 -prefs=runtime.tools.mkspiffs-0.2.3.path=C:\Users\JohnDoe\AppData\Local\Arduino15\packages\esp32\tools\mkspiffs\0.2.3 -verbose C:\Users\JohnDoe\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.5\libraries\ESP32\examples\Camera\CameraWebServer\CameraWebServer.ino
Using board 'esp32cam' from platform in folder: C:\Users\JohnDoe\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.5
Using core 'esp32' from platform in folder: C:\Users\JohnDoe\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.5
cmd /c if exist "C:\\Users\\JohnDoe\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.5\\libraries\\ESP32\\examples\\Camera\\CameraWebServer\\partitions.csv" copy /y "C:\\Users\\JohnDoe\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.5\\libraries\\ESP32\\examples\\Camera\\CameraWebServer\\partitions.csv" "C:\\Users\\WOUTER~1\\AppData\\Local\\Temp\\arduino_build_157495\\partitions.csv"
fork/exec C:\Program Files\Python37-32\LIB\cmd.py: %1 is not a valid Win32 application.
Error compiling for board AI Thinker ESP32-CAM.

I gues this is what matters most:

fork/exec C:\Program Files\Python37-32\LIB\cmd.py: %1 is not a valid Win32 application.
Error compiling for board AI Thinker ESP32-CAM.

Is there anyone how could let me know what is wrong here ?

Thanks!

your wiring looks OK, e.g. esp32-cam-intro
however, |I find it simpler to use a ESP32 CAM with a Development Board Power Interface
I assume you set up the IDE to for ESP-32 board
the example code I used was from esp32-cam-take-photo-display-web-server

Edit: when you attempted to use File>Examples>ESP32>Camera>CamerWebServer did you select

#define CAMERA_MODEL_AI_THINKER // Has PSRAM

works OK for me

Yes I uncommented #define CAMERA_MODEL_AI_THINKER

I updated the esp32 support in the board manager from:
https://dl.espressif.com/dl/package_esp32_index.json
To:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
(following instructions on https://randomnerdtutorials.com/installing-the-esp32-board-in-arduino-ide-windows-instructions/)

The folder is 2.15 GB, yes GigaByte! Jeez, whut?

Anyway, same error message:

fork/exec C:\Program Files\Python37-32\LIB\cmd.py: %1 is not a valid Win32 application.
Error compiling for board AI Thinker ESP32-CAM.

Ever since I've been playing around with Arduino I've never seen anything about Python being involved? Why is this showing up? Maybe my system is a complete train wreck?

I have that one as well
what I don't have is the directory C:\Program Files\Python37-32 any idea what it is?
perhaps have a look under Control Panel>Programs and features

I have Python 3.10 including the IDE on my PC but is a seperate application

I moved my project to a 64bit laptop and it works. Yeah I should really update that machine to 64 bit, but hey, for now, problem solved.

The ESP32 boards platform uses some Python scripts to help with the compiling and upload process. These scripts require Python to be installed on your computer even though the Arduino sketches are not written in the Python language and a C++ compiler is used to compile them.

Thanks for the info on the Python question :slight_smile:

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