Pyinstaller bundles python projects into a single file along with all dependencies as per wiki. Since its a python package installation is quite simple, use pip for linux based machines and brew install for mac. But i had tough time installing it on raspberry pi. I want to share my experience and how i solved it.
I installed it from source, documentation says pyinstaller's bootloader has to be built first. Here are the exact steps.
zlib1g-dev is required to compile boottloader
sudo apt-get update
sudo apt-get install zlib1g-dev
Clone the repo and follow the steps.git clone https://github.com/pyinstaller/pyinstaller.git cd bootloader python3 ./waf allafter building bootloader go back to repo's root directory and install
cd ../pyinstaller
python3 setup.py install
after successful installation, try using pyinstaller with any arguments, which supposed to show help and that verifies your installation.root@raspberry:/tmp/python-pkg# pyinstaller
usage: pyinstaller [-h] [-v] [-D] [-F] [--specpath DIR] [-n NAME]
[--add-data <SRC;DEST or SRC:DEST>]
[--add-binary <SRC;DEST or SRC:DEST>] [-p DIR]
[--hidden-import MODULENAME]
[--collect-submodules MODULENAME]
[--collect-data MODULENAME] [--collect-binaries MODULENAME]
[--collect-all MODULENAME] [--copy-metadata PACKAGENAME]
[--recursive-copy-metadata PACKAGENAME]
[--additional-hooks-dir HOOKSPATH]
[--runtime-hook RUNTIME_HOOKS] [--exclude-module EXCLUDES]
[--key KEY] [--splash IMAGE_FILE]
[-d {all,imports,bootloader,noarchive}] [-s] [--noupx]
[--upx-exclude FILE] [-c] [-w]
[-i <FILE.ico or FILE.exe,ID or FILE.icns or "NONE">]
[--disable-windowed-traceback] [--version-file FILE]
[-m <FILE or XML>] [-r RESOURCE] [--uac-admin]
[--uac-uiaccess] [--win-private-assemblies]
[--win-no-prefer-redirects]
[--osx-bundle-identifier BUNDLE_IDENTIFIER]
[--target-architecture ARCH] [--codesign-identity IDENTITY]
[--osx-entitlements-file FILENAME] [--runtime-tmpdir PATH]
[--bootloader-ignore-signals] [--distpath DIR]
[--workpath WORKPATH] [-y] [--upx-dir UPX_DIR] [-a]
[--clean] [--log-level LEVEL]
scriptname [scriptname ...]
pyinstaller: error: the following arguments are required: scriptname
Hopy you liked it.
0 Comments