How to use 2to3 properly for python?

Install the following module which adds the 2to3 command directly to entry_points.

pip install 2to3

As it is written on 2to3 docs, to translate an entire project from one directory tree to another, use:

2to3 --output-dir=python3-version/mycode -W -n python2-version/mycode

Leave a Comment