Skip to content

Instantly share code, notes, and snippets.

@isontheline
Last active May 24, 2021 15:32
Show Gist options
  • Select an option

  • Save isontheline/484f19e20b091ce8945831d1753b2b4c to your computer and use it in GitHub Desktop.

Select an option

Save isontheline/484f19e20b091ce8945831d1753b2b4c to your computer and use it in GitHub Desktop.
ESP32 - ModuleNotFoundError: No module named 'serial'
If you encounter error "ModuleNotFoundError: No module named 'serial'" on your macOS when using Arduino, 
it's perhaps Arduino is using Python 2 and not Python 3.
This Gist will allow you to install the pyserial module on Python 2

1) Download the latest pyserial .tar.gz file on

https://pypi.org/project/pyserial/#files

2) Extract the archive

tar -xvf pyserial-x.x.tar.gz

3) Install pyserial for Python 2

cd pyserial-x.x.tar.gz
sudo python2 setup.py install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment