Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple Hidden Imports in Pyinstaller

I know how to use the hidden import function in pyinstaller to import one python library. What if I have multiple python libraries like pyautogui and pandas? How do I hidden import them both? I’m thinking it looks something like this:

pyinstaller Pythonmain.py —hidden-import=‘pyautogui, pandas’

I’m sure it’s simple but I can’t find the answer anywhere.

like image 937
NewToPython Avatar asked May 23 '21 15:05

NewToPython


1 Answers

You can repeat the --hidden-import option:

pyinstaller main.py -—hidden-import pandas --hidden-import pyautogui

From the documentation, emphasis mine:

--hidden-import MODULENAME

Name an import not visible in the code of the script(s). This option can be used multiple times.

like image 171
Mustafa Aydın Avatar answered Sep 29 '22 16:09

Mustafa Aydın