Lodestone6 Lodestone6 - 6 months ago 39
Python Question

Why am I getting an "ImportError: No module named threaded" message?

I'm trying to run one of the examples from pyserial, tcp-ip-serial-bridge on my raspberry pi 2. When I run it, I get "ImportError: No module named threaded" on line 12 "import serial.threaded". All of my searching for this on stack overflow has shown many others using serial.threaded with no issue, asking questions about other import errors. Any ideas?

I saw some other similar (but different) errors were caused by things having slightly different names in newer versions of python, so if that's the case: does anyone know what serial.threaded is now called?

Thanks

Answer

from terminal on raspberry pi run:

sudo pip install pyserial
sudo pip install pyserial --upgrade

then try your code again

Comments