I am having a problem with PyInstaller including any imported custom modules. I have a main.py that calls a method from Printer.function import Repeat def main(): name = input("Your Name: ") Repeat(3,name) input("Press enter to exit") main() Through VS Code, everything is working. However using pyInstaller, when I run the exe file it throws an error that the module 'function' is not found. I am running this command pyinstaller.exe -p K:\HelloWorldEXE\Printer K:\HelloWorldEXE\main.py --onefile Can any one shed some light on this? I don't know how to use hidden-imports or hooks to make it work Thanks. Continue reading...