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
4261 gold badge4 silver badges18 bronze badges
asked Jun 30, 2021 at 12:29
2
  • 1
    "ImportError: No module named serial" Commented Jun 30, 2021 at 13:00
  • 2
    Install python3-serial Commented 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

answered Jul 1, 2021 at 18:16
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
answered Jun 30, 2021 at 17:55
1
  • I did both, it still shows the following error Commented Jul 1, 2021 at 18:01

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.