Python 如何在PyInstaller中指定.spec文件

Python 如何在PyInstaller中指定.spec文件,python,compilation,pyinstaller,Python,Compilation,Pyinstaller,使用--onefile和--noconsole选项使用-PyInstaller编译.py文件时,如何指定.spec文件 C:\Python27\python.exe C:\Python27\Lib\site-packages\PyInstaller\main.py --onefile --noconsole main.spec PyInstaller将生成一个.spec文件。您可以先在单文件应用程序上运行它,然后在以后运行时参考您编辑的.spec文件 使用一个文件应用程序: pyinsta

使用--onefile--noconsole选项使用-PyInstaller编译.py文件时,如何指定.spec文件

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

PyInstaller将生成一个
.spec
文件。您可以先在单文件应用程序上运行它,然后在以后运行时参考您编辑的
.spec
文件

  • 使用一个文件应用程序:

    pyinstaller main.py

    注意:这将覆盖
    main.spec
    ,因此在以后的运行中不要使用它

  • 使用
    .spec
    文件:

    pyinstaller main.spec