ModuleNotFoundError: No module named 'serial'

Hi to all,
I'm using arduino 1.8.13 and when i tried to compile for the esp32_cam i got this error. But if I use the esp8266 works fine.
the full error is:
File "/home/gaston/.arduino15/packages/esp32/tools/esptool_py/3.0.0/esptool.py", line 38, in
import serial
What I tried so far:

  1. Re install arduino
  2. pip install esptool
  3. sym link python with python3
    If I open a terminal and put python I can import serial, so python is linked with python3 but why arduino can't find it?
    Any ideas?
    Gastón

Hi to all, about this error, If I remove the sym link between python3 and python the error is gone but this one comes out:
exec: "python": executable file not found in $PATH
Im using arduino on linux 64 opensuse Tumbleweed.
Gastón

Try running this command from the command line to install the serial package for Python:

pip3 install pyserial

I would undo that. I think it is not an effective solution.

Hi pert,
thanks for your reply. I did the command you mention and the output is:

Requirement already satisfied: pyserial in /usr/lib/python3.8/site-packages (3.5)

What I did so far:

  1. creating symbolic link between python3 and python
  2. re-installing arduino 1.8.13
  3. add permisson to USB port
    When I opened a terminal and type python I'm able to import the serial without any errors, but arduino throws that error. But Im able to prgram the esp8266 and run the program.
    Gastón

I always have trouble with all the different names for Python and pip on Linux. You could try this:

pip install pyserial

Maybe that would install the package for the version of Python that is being used by the ESP32 platform.

Hi pert,
thanks for your time and quick reply, but I already tried that and still the same. If I remove the symlink between python and python3 throws an error about python not n the $path and give a link to github where others post about this error. But not solved (not for me Im working on linux tumbleweed 64 machine).
I can program the ESP32-CAM with platformio, so the board is working. Is a arduino not using the pyserial but with the esp8266 works like a charm.
Gastón