1

SO i have been getting this error window when i compile a simple code to run different LED lights on the ESP32-S2-SOLA (Wrovere) module

Code:

int LED_BUILTIN = 2;

void setup() { pinMode (LED_BUILTIN, OUTPUT); }

void loop() { digitalWrite(LED_BUILTIN, HIGH); delay(1000); digitalWrite(LED_BUILTIN, LOW); delay(1000); }

error:

Arduino: 1.8.15 (Linux), Board: "ESP32 Wrover Module, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), QIO, 80MHz, 115200, None"

Traceback (most recent call last): File "/home/student/.arduino15/packages/esp32/tools/esptool_py/3.0.0/esptool.py", line 38, in <module> import serial ImportError: No module named serial exit status 1 Error compiling for board ESP32 Wrover Module.

Python Schlange
  • 426
  • 1
  • 4
  • 18
AsmAsmAsm
  • 21
  • 2

2 Answers2

1

The error can be solved by installing Python serial package via these two commands

$ sudo apt-get update -y $ sudo apt-get install -y python-serial

AsmAsmAsm
  • 21
  • 2
0

As Juraj and Majenko pointed out in the comments, your python installation lacks the module serial. In Linux the best way to install it would be pip or rather pip3 for Python 3:

sudo pip3 install serial

If you don't have pip3 on you system, install python3-pip first, e. g. using apt:

sudo apt install python3-pip
Python Schlange
  • 426
  • 1
  • 4
  • 18