Convert Py2 script to py3 script on macosx If you are running macos, you can easily convert it using the following script:\ python3 /Library/Frameworks/Python.framework/Versions/3.6/bin/2to3 -w pytnon_2_script.py