Issue with module not found even after use collect all and hidden import

27 views
Skip to first unread message

Juan Sebastian Garcia Perez

unread,
Dec 18, 2024, 1:31:00 PM12/18/24
to PyInstaller
I hope this email finds you well

I am trying to develop an executable with a GUI build with PyQt6 this GUI will run a .py file that uses selenium to scrap some information from a particular web, the idea is that the .exe can run in a computer without having python installed

This is the code bloc to build the executable 

!python -m PyInstaller --clean --onefile --windowed \
--exclude PyQt5 \
--exclude-module IPython \
--hidden-import=PyQt6.QtCore --hidden-import=PyQt6.QtWidgets \
--hidden-import=encodings --hidden-import=re \
--hidden-import=time --hidden-import=traceback --hidden-import=openpyxl \
--hidden-import=xlsxwriter --hidden-import=xlsx2csv --hidden-import=subprocess \
--hidden-import=pathlib --hidden-import=sys --hidden-import=os \
--add-data "C:\\Users\\PC\\Documents\\Python-Scripts\\IFABCorp\\Download-Contracts-Interface.py;." \
--add-data "C:\\Users\\PC\\Documents\\Python-Scripts\\IFABCorp\\chromedriver.exe;drivers" \
--add-binary "C:\\ProgramData\\anaconda3\\python312.dll;." \
--add-binary "C:\\ProgramData\\anaconda3\\python.exe;." \
--add-data "C:\\ProgramData\\anaconda3\\Lib\\encodings;encodings" \
--runtime-hook "C:\\Users\\PC\\Documents\\Python-Scripts\\IFABCorp\\set_pythonhome.py" \
--add-binary "C:\\ProgramData\\anaconda3\\Library\\bin\\libssl-3-x64.dll;." \
--add-binary "C:\\ProgramData\\anaconda3\\Library\\bin\\libcrypto-3-x64.dll;." \
--collect-all=numpy \
--collect-all=pandas \
--collect-all=selenium \
--collect-all=typing \
--collect-all=dotenv \
--collect-all=collections \
--additional-hooks-dir="C:\\Users\\PC\\Documents\\Python-Scripts\\IFABCorp\\hooks" \
--collect-all=keyword \
--collect-submodules=keyword \
--debug all \
"C:\\Users\\PC\\Documents\\Python-Scripts\\IFABCorp\\Contracts-GUI.py"

However I am still having issues with the module keyword even after using hidden and collect as you can see

Reply all
Reply to author
Forward
0 new messages