0

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
1
  • Dont u wonder why there are two different pakages of python versions for 64 bit and 32 bit windows? Commented Apr 2, 2014 at 16:03

2 Answers 2

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
Sign up to request clarification or add additional context in comments.

Comments

0

You can use something called pyinstaller. Install it using pip install PyInstaller. To use it follow these steps.

  1. In command line do pyinstaller your_file.py
  2. 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!

answered Aug 6, 2018 at 17:24

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.