Search code examples
installationsyntax-errorpyserialpypi

How to resolve pypi/ pyserial installation warning for setup.py 'unknown distribution option: 'use_2to3'"


I am installing pyserial2.7 using

python install setup.py

and get the warning "unknown distribution option: 'use_2to3'" after this warning, it gives a set of running.... install, build and so on. However,

import.serial 

inside python, gives invalid syntax error. I guess, the pyserial did not install properly. How do I resolve this ? I am using Python 2.7 on debian , if that helps


Solution

  • python install setup.py

    The correct syntax is

    python setup.py install
    

    import.serial

    The correct syntax is

    import serial
    

    PySerial 2.7 is rather old version, the current version is 3.4.