How to create a "* .exe" executable in python?

14

I need to turn ".py" files into ".exe" executables to run on any Windows desktop.

Currently use 3.3

    
asked by anonymous 24.04.2014 / 04:27

3 answers

9

I would like to register my suggestion for PyInstaller or cx_Freeze .

In any case none of them can guarantee that it will run on any windows desktop.

Firstly if you are using windows 7 64 bit for example to generate the executables, they will not run on windows 7 32 bit, but the opposite will work.

However, if you are using Windows 64 bit with python 32 bit, the generated files will be 32 bit, and will work on Windows 32 bit and also 64 bit.

In any case it is worth testing if the program opens, it might not work on older windows than XP, especially if your program depends on other libraries like QT.

    
26.04.2014 / 20:35
7

For this particular version cx_Freeze solves your problem, for previous versions there are these alternatives: PstInstaller , py2exe , bbfreeze

    
24.04.2014 / 04:30
1

pyinstaller is legal and simple to use. First you should use a manager (probably pip ) to install it

pip install pyinstaller

Then, just run

pyinstaller -w nome_do_software

Or     pyinstaller software_name.py

to get the desired result.

    
05.05.2017 / 17:39