Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I specifiy the .spec file in PyInstaller

How can I specifiy the .spec file while compiling my .py file with PyInstaller using the --onefile and --noconsole options?

like image 818
ArmindoFlores Avatar asked May 11 '14 14:05

ArmindoFlores


2 Answers

PyInstaller will generate a .spec file. You can run it first against your one file app and then for future runs reference your edited .spec file

  • Use one file app:

    pyinstaller main.py

    Note: this will overwrite main.spec so don't use this on future runs

  • Use .spec file:

    pyinstaller main.spec

like image 93
Glen Thompson Avatar answered Sep 19 '22 01:09

Glen Thompson


Try something like this:

C:\Python27\python.exe C:\Python27\Lib\site-packages\PyInstaller\main.py --onefile  --noconsole main.spec
like image 27
NorthCat Avatar answered Sep 17 '22 01:09

NorthCat