Hi everyone I want to convert my python file to installer
(windows installer) not executable
. I already make it executable
through py2exe
. How can I make an Installer of it. Is it possible.

- 101
- 10
-
take a look on this project https://nsis.sourceforge.io/Main_Page – Maciek Apr 30 '20 at 14:58
-
Does this answer your question? [Python files to an MSI Windows installer](https://stackoverflow.com/questions/50879667/python-files-to-an-msi-windows-installer) – Bob Arnson Apr 30 '20 at 16:30
-
https://cyrille.rossant.net/create-a-standalone-windows-installer-for-your-python-application/ – sleepyhead Apr 30 '20 at 16:43
1 Answers
Pyinstaller is a good option to convert python scripts to an windows executable.
You can install it in cmd.exe
as any user and run pip install pyinstaller
or pip install --pre pyinstaller
.
you can then run it using pyinstaller
. (sorry that i can't supply a automated script i wrote after a system restore. I'll write it again soon using pyqt5)
syntax
--onefile
- puts the program and it's files into a exe.
--onedir
- put your program into a directory (folder) (faster than--onefile
as it does not need to extract files)
-c
- create a console app.
-w
- create an app without the console.
-i "[Path to .ico or exe with icon. e.g C:\Files\CODE\Icon.ico]"
- set an icon for your app instead of the default snake-on-a-floppy-disk icon.
you can read the rest here.
You can then get inno setup and create an offline installer.
[sorry, could not be bothered to type it again] i posted it on https://stackoverflow.com/posts/61597594

- 116
- 1
- 5