There’s no distinction between builtin and 3rd party libraries to PyInstaller so you won’t find an --include-standard-lib option. That python-stdlib-list sounds like a sensible option. All you’d need to so is edit the .spec file: put from stdlib_list import stdlib_list at the top and replace hiddenimports=[], with hiddenimports=stdlib_list("3.7"), (or whatever your Python version is. That would mean you wouldn’t need to include or run stdlib_list in the executable itself.