How can I specifiy the .spec file in PyInstaller

10,380

Solution 1

Try something like this:

C:\Python27\python.exe C:\Python27\Lib\site-packages\PyInstaller\main.py --onefile  --noconsole main.spec

Solution 2

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

Share:
10,380
ArmindoFlores
Author by

ArmindoFlores

Updated on June 07, 2022

Comments

  • ArmindoFlores
    ArmindoFlores almost 2 years

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