Under python < 3.10, hydra's plugin manager continues to use deprecated PEP-302 functionality that was removed from PyInstaller's PyiFrozenImporter in PyInstaller 5.8 (pyinstaller/pyinstaller#7344.). At run-time, this results in AttributeError: 'PyiFrozenImporter' object has no attribute 'find_module'.
As a work-around, check python version and PyInstaller version, and if using python < 3.10 and PyInstaller >= 5.8, set module collection mode for hydra._internal.core_plugins and hydra_plugins packages to py to collect their modules as source .py files only. This way, they end up handled by python's built-in finder/importer, instead of PyInstaller's PyiFrozenImporter.
Under python < 3.10,
hydra
's plugin manager continues to use deprecated PEP-302 functionality that was removed from PyInstaller'sPyiFrozenImporter
in PyInstaller 5.8 (pyinstaller/pyinstaller#7344.). At run-time, this results inAttributeError: 'PyiFrozenImporter' object has no attribute 'find_module'
.As a work-around, check python version and PyInstaller version, and if using python < 3.10 and PyInstaller >= 5.8, set module collection mode for
hydra._internal.core_plugins
andhydra_plugins
packages topy
to collect their modules as source .py files only. This way, they end up handled by python's built-in finder/importer, instead of PyInstaller'sPyiFrozenImporter
.