I have a large ML project in python 2 code and I just started using PyCharm as an IDE. I\'m currently using WinPython 3.4 and I\'d preferably like to do everything in python
There's a script included with Python, usually at [Python Root]/Tools/Scripts/2to3.py
. You can run that script on a python file (or directory of python files) and it will handle a lot of the conversions, at least for changes in the standard library.
It gets a little more complicated if your project uses other 3rd party libraries. It's possible the API's for those changed during the 2-to-3 transition, and the 2to3.py
script will not know about those api changes. Your best bet is to run the conversion script, and then manually make any other changes that are needed.