4

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?

Bono
  • 4,757
  • 6
  • 48
  • 77
abc
  • 61
  • 1
  • 1
  • 3
  • Which version of `py2exe` did you download? See http://stackoverflow.com/questions/41570359/best-method-of-converting-py-to-exe-for-python-3-6 and http://stackoverflow.com/questions/41642021/compiling-script-py-with-py2exe-python-3-6-returns-multiple-errors?noredirect=1 – cdarke Apr 09 '17 at 08:31
  • the latest version 0.9.2.2 – abc Apr 09 '17 at 08:49
  • That doesn't support 3.6 yet. – cdarke Apr 09 '17 at 08:56

3 Answers3

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.
RïshïKêsh Kümar
  • 4,734
  • 1
  • 24
  • 36
1

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).

ikamen
  • 3,175
  • 1
  • 25
  • 47
0

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