![](/img/trans.png)
[英]Python (with Tkinter and Selenium Webdriver, created with pyinstaller) app doesn't work on other pc's
[英]Distributing my TKinter app with pyinstaller doesn't work
我有一個包含 2 個類的應用程序:稱為 GUI 的 class 和 GUI 使用的邏輯 class。 GUI class 應用程序由 class 底部的這 4 行啟動:
if __name__ == '__main__':
global g
g = gui()
g.start()
但是當我嘗試在 cmd 上執行以下命令時:
pyinstaller --onefile --noconsole --GUI.py
我收到以下錯誤:
pyinstaller: error: the following arguments are required: scriptname
我能做些什么? 我希望可以選擇將應用程序部署給用戶,他們可以在下載項目的 zip 文件后單擊並啟動它。 該項目由上述2個類和一個圖像組成。
如果那是 python 文件的名稱,您應該可以去掉 GUI.py 前面的兩個破折號。 看這里
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.