Research findings: - collect_all() has design flaws and poor performance with pydantic - Pydantic uses compiled cpython extensions that prevent module discovery - collect_submodules() is the recommended approach per PyInstaller docs Changes: - Replaced collect_all() with collect_submodules() for better reliability - Now collects 105 pydantic submodules (vs unreliable collect_all) - Added collect_data_files() for packages requiring data files - Added explicit pydantic dependencies: colorsys, decimal, json, etc. - Applies to both Windows AND Linux (no longer platform-specific) Results: ✓ Collected 52 submodules from fastapi ✓ Collected 34 submodules from starlette ✓ Collected 105 submodules from pydantic ✓ Collected 3 submodules from pydantic_core ✓ Plus uvicorn, websockets, h11, anyio Fixes: ModuleNotFoundError: No module named 'fastapi' on Windows Based on: https://github.com/pyinstaller/pyinstaller/issues/5359
4.1 KiB
4.1 KiB