pyserial: No module named tools pyserial: No module named tools python python

pyserial: No module named tools


Use pip to install pyserial. First install pip:

sudo apt-get install python-pip

After that install pyserial:

sudo pip install pyserial


I got here because I had the same problem.The strange thing was that

import serial

worked, but

from serial.tools import list_ports

didn't.

Turns out stupid me named the script "serial.py". After renaming it everything worked.


You have to uninstall serial and pyserial then reinstall pyserial:

pip uninstall serialpip uninstall pyserialpip install pyserial

Because the both libs contain a file named serial.py, you get a name conflict.