John
John

Reputation: 19

ModuleNotFoundError: No module named 'serial'

This is Arduino Python.

The Python script is giving me an error with the following line:

import serial

The error is:

ModuleNotFoundError: No module named 'serial'

I want to understand the relationship between the software libraries. where is the serial library? I think the library is there, but the present Python script is not finding it.
john

Upvotes: 2

Views: 15806

Answers (2)

chadgh
chadgh

Reputation: 9773

After checking to see if it is there like @araldo-van-de-kraats says (pip freeze), it looks like you probably want to make sure you've installed pySerial:

pip install pyserial

See the documentation here.

Upvotes: 4

Araldo van de Kraats
Araldo van de Kraats

Reputation: 304

From the command line, check if it is installed with:

pip freeze

If it is not installed, you can install it with:

pip install serial

Upvotes: 1

Related Questions