I have a .py file and want to converrt it to .exe, I have tried by using py2exe but it created dist folder, and if I move the exe file out of dist it is not working. How can I have single working .exe file?
Asked
Active
Viewed 241 times
0
-
See also this question : https://stackoverflow.com/questions/112698/py2exe-generate-single-executable-file – Julien Aug 31 '17 at 14:01
2 Answers
0
You can have a look to pyinstaller.
There may be an option to embbed all dependencies from the folder into the exe. Then you will be able to move it. For pyinstaller, the option is -F
or --onefile
.

Julien
- 1,810
- 1
- 16
- 34
0
For Windows users
Go to the sourceforge site, where the cx_Freeze project is hosted. And download the file corresponding to your version of Python.
After downloading it, launch the executable and let yourself be guided. Nothing too technical so far!
I invite you to go to the command line (Start > Run... > cmd).
Go to the scripts subfolder of your Python installation (me, C: \python34\scripts).
On Windows or Linux, the script syntax is the same: cxfreeze file.py
.

Xire
- 166
- 7