How can I solve "No module named 'pyi_splash'" after using pyinstaller?

Viewed 837

I'm trying to add a splashscreen to my app using pyinstaller by this:

pyinstaller.exe --onefile --splash=Splash_screen.png --icon=Icon.ico JIGOverview.pyw

this opens the splashscreen but it never closes so then I try to add this code to my Python code:

import pyi_splash
pyi_splash.update_text('UI Loaded ...')
pyi_splash.close()
  

but I get a "No module named 'pyi_splash'" error. How do I add this module to my code?

1 Answers

Add the --hidden-import option:

pyinstaller.exe --onefile --splash=Splash_screen.png --icon=Icon.ico --hidden-import=pyi_splash JIGOverview.pyw
Related