compile_python_to_an_executable
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
compile_python_to_an_executable [2022/08/16 08:35] – created 192.168.1.49 | compile_python_to_an_executable [2022/08/17 04:35] (current) – 192.168.1.21 | ||
---|---|---|---|
Line 1: | Line 1: | ||
From a post on StackOverflow at https:// | From a post on StackOverflow at https:// | ||
+ | Here is the relevant text from the post: | ||
---- | ---- | ||
Line 7: | Line 7: | ||
You can use PyInstaller to package Python programs as standalone executables. It works on Windows, Linux, and Mac. | You can use PyInstaller to package Python programs as standalone executables. It works on Windows, Linux, and Mac. | ||
- | PyInstaller Quickstart | + | PyInstaller Quickstart\\ |
Install PyInstaller from PyPI: | Install PyInstaller from PyPI: | ||
- | pip install pyinstaller | + | pip install pyinstaller\\ |
Go to your program’s directory and run: | Go to your program’s directory and run: | ||
- | pyinstaller yourprogram.py | + | pyinstaller yourprogram.py\\ |
This will generate the bundle in a subdirectory called dist. | This will generate the bundle in a subdirectory called dist. | ||
- | pyinstaller -F yourprogram.py | + | pyinstaller -F yourprogram.py\\ |
Adding -F (or --onefile) parameter will pack everything into single " | Adding -F (or --onefile) parameter will pack everything into single " | ||
- | pyinstaller -F --paths=< | + | pyinstaller -F --paths=< |
running into " | running into " | ||
- | pip install pynput==1.6.8 | + | pip install pynput==1.6.8\\ |
still runing in Import-Erorr - try to downgrade pyinstaller - see Getting error when using pynput with pyinstaller | still runing in Import-Erorr - try to downgrade pyinstaller - see Getting error when using pynput with pyinstaller | ||
For a more detailed walkthrough, | For a more detailed walkthrough, |
compile_python_to_an_executable.1660653348.txt.gz · Last modified: 2022/08/16 08:35 by 192.168.1.49