I converted my gui.py to gui.exe with py2exe, but it works only on windows 8 64 bit, when I tried it on win7 32 bit , it won't work
this code that converted .py to .exe
from distutils.core import setup
import py2exe
setup(console=['gui.py'])
any way to convert .py to .exe that works on all windows operating systems ...?
asked Apr 2, 2014 at 15:55
blaz1988
631 gold badge1 silver badge6 bronze badges
-
Dont u wonder why there are two different pakages of python versions for 64 bit and 32 bit windows?Arvind– Arvind2014年04月02日 16:03:09 +00:00Commented Apr 2, 2014 at 16:03
2 Answers 2
You're building a 64-bit .exe, which won't work on 32-bit Windows. Install a 32-bit copy of Python and use that to make the package - it will be 32-bit then.
answered Apr 2, 2014 at 15:58
nobody
20.3k17 gold badges59 silver badges80 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
You can use something called pyinstaller. Install it using pip install PyInstaller. To use it follow these steps.
- In command line do
pyinstaller your_file.py - In file explorer go to your your folder where the python file was created. In that folder you will see a folder called dist. In that folder there will be a executable file which is your_file.exe or your_file without extension.
This works for both 64-bit and 32-bit!
Comments
lang-py