Package Python script into exe application

1. Use PyInstaller’s –onefile option to generate a separate executable file that contains the script and its dependent libraries. This way you can have just one exe file without the need for an accompanying folder.
2. Use the –hidden-import option to specify the library to be hidden.

pyinstaller --onefile --hidden-import pandas your_script.py
pyinstaller --onefile --hidden-import pandas .\main.py

Guess you like

Origin blog.csdn.net/qq_34663267/article/details/131838449