How can I make a python program run without python installed (like blender)? Is it includes liblaries to the program itself (Am I need to run "pip install which liblaries used" before running the program)? And how can i make this for a program with multiple scripts?
-
1What you are looking for are tools that embed a script, required modules and a Python interpretor in a native executable program like PyInstaller of py2exe. More [here](https://stackoverflow.com/q/6235123/3545273) – Serge Ballesta Dec 11 '20 at 08:49
-
In which Operating System? – goodvibration Dec 11 '20 at 08:56
3 Answers
I use autopytoexe for windows applications. It has GUI and you can save the compile settings.

- 38
- 8
I don't have personal experience with this, but, as noted it the comments, it appears these are the tools that will do what you want.
Windows: https://pypi.org/project/py2exe/
MacOS: https://pypi.org/project/py2app/
Cross-platform: https://pypi.org/project/cx-Freeze/

- 126
- 1
- 8
If you are the one who did the programming, and want your program to run on a system (with or without python installed), you can convert your initial python file into an executable, that is, files with the .exe
extension.
TO CONVERT - Open your Terminal:
pip install pyinstaller
After installing pyinstaller
, type in: pyinstaller --onefile your_python_file.py
. This will convert your file to an executable. CAVEAT: If your file will use a terminal, then put a -w
after --onefile
, if it is graphical, then don't. After the conversion, you can see a dist folder
, it contains your .exe
file. Try running your file then, and see if it runs with no error.

- 129
- 3
- 11