What is the correct command of pyinstaller to successfully build .exe file from python project.
I've tried below commands but not working in my case.
Project
|--->main.py
|--->second.py
|--->images (folder)
|--->image.jpg
Above is my project structure. I have given main.py to pyinstaller command.
pyinstaller --noconfirm --onedir "main.py" --console --log-level "DEBUG" --add-data "images/image.jpg;." --add-data "second.py;."
Exe is generated from above line and also runs but when it calls second.py it shows error that modules not found. As both python files uses same modules.
I've also tried using virtualenv and given path of it.
pyinstaller --noconfirm --onedir "main.py" --console --log-level "DEBUG" --add-data "images/image.jpg;." --add-data "second.py;." --paths "venv/Lib/site-packages" --paths "venv/Lib"
This don't even run exe.