package).
To reproduce, create a script called
mwe.py with the following content:
import mne
print(mne.sys_info())
Then run
pyinstaller mwe.py, and try executing the generated app with
dist/mwe/mwe. This gives the following error (I tried this on macOS):
Traceback (most recent call last):
File "mwe.py", line 1, in <module>
import mne
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "PyInstaller/loader/pyimod02_importers.py", line 450, in exec_module
File "mne/__init__.py", line 30, in <module>
File "lazy_loader/__init__.py", line 342, in attach_stub
ValueError: Cannot load imports from non-existent stub '/Users/clemens/Desktop/test-pyinstaller-pyi/dist/mwe/_internal/mne/__init__.pyi'
[PYI-16568:ERROR] Failed to execute script 'mwe' due to unhandled exception!
Thanks!
Clemens