Pyserial 2.7 cannot be installed on a Python 3.3 installation
Brought to you by:
cliechti
I'm trying to use pyserial 2.7 with Python 3.3 on Ubuntu 13.10.
I downloaded the sources and installed pyserial with the following command:
python3 setup.py install
I got the following warning:
/usr/lib/python3.3/distutils/dist.py:257: UserWarning: Unknown distribution option: 'use_2to3'
then when I 'import serial', I get the following error:
>>> import serial Traceback (most recent call last): File "<stdin>", line 1, in <module> File "./serial/__init__.py", line 21, in <module> from serial.serialposix import * File "./serial/serialposix.py", line 58 except IOError, e: ^ SyntaxError: invalid syntax
It looks like 3to3 hasn't been applied
if I run
find serial -name "*.py" -exec 2to3 -n -w --no-diffs {} \; python3 setup.py install
pyserial works properly
Installing using apt-get install python3-serial also works.
please try v3.0a0 from https://github.com/pyserial/pyserial/releases where Python 3 support was improved