![](/img/trans.png)
[英]How can I dynamically change the target directory in spec file of pyinstaller?
[英]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.