'using py2exe on python 3.6 to convert .py to .exe

I am very new to Python and am using python 3.6. I want to convert my .py file to an .exe file. I'm learning to do so with the help of this tutorial, but I am stuck in step 3 because of the following error:

IndexError: tuple index out of range

setup.py:

from distutils.core import setup  
import py2exe  

setup(console=['hello.py'])*  

How can I fix this?



Solution 1:[1]

Python 3.6 is not supported yet. ... You Have To Try Python 3.3 Version For It To Solve This Error ..Thank U

Python 3.6 still isn't supported by Pyinstaller. So in order to use it you're Python 3.5 or 3.3 or bellow.

Solution 2:[2]

Consider using https://www.pyinstaller.org/, it works with 3.6 and can package most of the libraries as well.

It worked for me to export PyQT application, which is now usable on both Win7 and Win10 in portable form (just download all the files and launch the .exe).

Solution 3:[3]

there is a project on GitHub which managed to get py2exe working on python 3.6/3.7: https://github.com/albertosottile/py2exe

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 RïshïKêsh Kümar
Solution 2 ikamen
Solution 3 amir ramezani