-
Notifications
You must be signed in to change notification settings - Fork 0
Building an Executable
TFD-42 edited this page Aug 13, 2026
·
1 revision
pip install pyinstaller psutil networkx matplotlib requests
pyinstaller --onefile --console --name ProcessAnalyzer \
--collect-all psutil \
--collect-submodules matplotlib \
process_analyzer_allinone.pyThe executable lands in dist/. Rules learned the hard way:
-
Install all dependencies in the SAME environment as
pyinstaller. PyInstaller only bundles what it can see installed at build time. -
--collect-all psutilis mandatory. psutil ships an OS-specific compiled extension (_psutil_osx/_psutil_linux/_psutil_windows) that PyInstaller misses on its own; without the flag the build succeeds but the binary crashes at launch withmissing module(s): psutil. -
--consoleis mandatory — the wizard and the "press a key" pause need a visible console. - No cross-compilation: build on the OS you target.
- In a compiled executable, missing dependencies are not auto-installed at runtime (that would be a build bug) — the binary prints a clear message and exits cleanly.
- On macOS, Gatekeeper will block the unsigned binary on first launch: right-click → Open, or
xattr -cr dist/ProcessAnalyzer. - Android/Termux cannot be targeted at all — see Android / Termux.
If another module is reported missing at runtime, first check pip show <module> in the environment used to run pyinstaller before adding a --collect-all for it.
Proc_Map_Analyzer · MIT License · Local-first: your process data never leaves your machine.
Setup
Usage
Concepts
Platforms
Help