簡體   English   中英

如何在 PyInstaller 中指定 .spec 文件

[英]How can I specifiy the .spec file in PyInstaller

我怎么可以指定地址的.spec文件,而使用--onefile--noconsole選項編譯我的.py文件與PyInstaller?

嘗試這樣的事情:

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM