I tried to import serial or pyserial in python 3.4 to no avail:
debian@beaglebone:~$ python3
Python 3.4.2 (default, Oct 8 2014, 14:38:51)
[GCC 4.9.1] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import serial
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named ‘serial’
>>> import pyserial
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named ‘pyserial’
If I use python 2.7, then I can import serial but not pyserial:
debian@beaglebone:~$ python
Python 2.7.9 (default, Aug 13 2016, 17:56:53)
[GCC 4.9.2] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import pyserial
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named pyserial
>>> import serial
>>> ser = serial.Serial()
If I list modules with pip, I see pyserial:
debian@beaglebone:~$ pip list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
Adafruit-BBIO (1.0.3)
astroid (1.2.1)
blinker (1.3)
cffi (0.8.6)
chardet (2.3.0)
colorama (0.3.2)
cryptography (0.6.1)
dropbox (8.0.0)
Flask (0.10.1)
html5lib (0.999)
itsdangerous (0.24)
iw-parse (0.0.2)
Jinja2 (2.7.3)
logilab-common (0.62.0)
MarkupSafe (0.23)
ndg-httpsclient (0.3.2)
pip (9.0.1)
ply (3.4)
pyasn1 (0.1.7)
PyBBIO (0.10)
pycparser (2.10)
pygobject (3.14.0)
pyinotify (0.9.4)
pylint (1.3.1)
pyOpenSSL (0.14)
pyserial (3.3)
requests (2.13.0)
serbus (1.0.5)
setuptools (5.5.1)
six (1.8.0)
urllib3 (1.9.1)
Werkzeug (0.9.6)
wheel (0.24.0)
If I try to upgrade pyserial, I get error saying that I’ve already got the latest:
debian@beaglebone:~$ sudo pip install --upgrade pyserial
[sudo] password for debian:
Requirement already up-to-date: pyserial in /usr/local/lib/python2.7/dist-packages
Again, my goal is to user serial port on BBB preferably on Python 3.4 instead of 2.7. Right now, importing doesn’t work for serial and pyserial in 3.4. Thanks