# Python “No module named serial”: install pyserial, not serial

> Fix a missing serial module: install the pyserial package for the Python you run, and remove the wrong package named serial.

Canonical: https://roboticsengineering.in/fix/python-importerror-no-module-named-serial-pyserial/ | Published: 2026-11-03 | Updated: 2026-11-03

**Install pyserial, not serial.** The package is named pyserial but imported as serial.

## What the message means

A different package called serial exists and breaks the import. Also, pip may install for a different Python than the one you run.

## Fix it in this order

1. Uninstall the package named serial if it is installed.
2. Install pyserial with pip for the same Python you run.
3. Use python -m pip to be sure the versions match.
4. Check the import with a one-line test.
5. Use a virtual environment for each project.
6. Check the port name and permission afterwards.

## Why it happens

The module imported as serial is provided by the package pyserial. Installing a package named serial gives a different library that does not work. The error also appears when pip installed the package for a different Python from the one running your script.

Run pip uninstall serial, then pip install pyserial, and use the same interpreter for both, for example python -m pip install pyserial.

## If you see this, do this

| You see | Do this |
| --- | --- |
| Module not found | Package missing for this Python. |
| Has no attribute Serial | Wrong serial package. |

## Related

[serial permission](https://roboticsengineering.in/fix/python-serial-permission-denied-dev-ttyusb0/), [Serial Monitor blank](https://roboticsengineering.in/fix/serial-monitor-shows-nothing/).

Last reviewed: November 2026. These are the usual causes and the order that finds them fastest. Test on your own board; clones and cables differ.
