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.
2
  • 1
    "ImportError: No module named serial"
    – Juraj
    Jun 30, 2021 at 13:00
  • 2
    Install python3-serial
    – Majenko
    Jun 30, 2021 at 16:28

2 Answers 2

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

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
2
  • I did both, it still shows the following error
    – AsmAsmAsm
    Jul 1, 2021 at 18:01
  • I made it work, thank you for the help
    – AsmAsmAsm
    Jul 1, 2021 at 18:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.