Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

python

py2exe

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?

like image 710
abc Avatar asked Aug 30 '25 18:08

abc


2 Answers

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.
like image 53
RïshïKêsh Kümar Avatar answered Sep 02 '25 07:09

RïshïKêsh Kümar


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

like image 27
ikamen Avatar answered Sep 02 '25 06:09

ikamen