I tried to apply pyinstaller to the simple file vtest.py
import vtk
print('Hello World')
on windows. I can run the command
py vtest.py
without issue. But when I try to generate an exe with the command
pyinstaller vtest.py --onefile
I get the error when I try to run the executable
Traceback (most recent call last):
File "vtest.py", line 1, in <module>
File "c:\users\djame\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 493, in exec_module
exec(bytecode, module.__dict__)
File "vtk.py", line 30, in <module>
File "importlib\__init__.py", line 127, in import_module
ModuleNotFoundError: No module named 'vtkmodules'
[11448] Failed to execute script vtest
I tried changing the hook file as outlined here but no luck.