Page 1 of 1

ESP32 / Arduino IDE problem - ModuleNotFoundError: No module named 'serial'

Posted: Mon Mar 27, 2023 10:49 am
by DronePilot
Hello forum!

I am trying to verify sample / example code for ESP32 and I got error every time:
Traceback (most recent call last):
File "/home/cc/.arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool.py", line 31, in <module>
import esptool
File "/home/cc/.arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool/__init__.py", line 41, in <module>
from esptool.cmds import (
File "/home/cc/.arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool/cmds.py", line 14, in <module>
from .bin_image import ELFFile, ImageSegment, LoadFirmwareImage
File "/home/cc/.arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool/bin_image.py", line 14, in <module>
from .loader import ESPLoader
File "/home/cc/.arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool/loader.py", line 30, in <module>
import serial
ModuleNotFoundError: No module named 'serial'

exit status 1

Compilation error: exit status 1
I have installed pyserial with command:

python -m pip install pyserial

but this did not solve the problem

I am using Linux Ubuntu and Arduino IDE.


Thanks for help!

Re: ESP32 / Arduino IDE problem - ModuleNotFoundError: No module named 'serial'

Posted: Tue Mar 28, 2023 3:31 am
by corz.org
What version of Python are you using?
Also, ensure you have the correct upload settings in your IDE.

Re: ESP32 / Arduino IDE problem - ModuleNotFoundError: No module named 'serial'

Posted: Wed Mar 29, 2023 1:23 am
by NigelTwo
With LinuxMint21.1 (Ubuntu derivative) I found that installing the deb package esptool fixed this.

Re: ESP32 / Arduino IDE problem - ModuleNotFoundError: No module named 'serial'

Posted: Tue Apr 11, 2023 9:20 am
by DronePilot
Problem solved - I have installed Arduino IDE from "Ubuntu Software". Now IDE works good!

Re: ESP32 / Arduino IDE problem - ModuleNotFoundError: No module named 'serial'

Posted: Sun Apr 16, 2023 6:46 am
by tempAccount123456
lol for me i was messing around with my usergroups. I am part of dialout but sometimes in couldnt see USB0 when using ls /dev/tty*. Somehow i ended up adding myself to a group with root and then chmodding group perms for rw. Worked. But not safe. Whatever though. Its my personal machine lol