[英]Cannot run python exe file after create with pyinstaller
所以我有這個python
項目,它使用argparse
庫來接受arguments
。 當我使用此命令使用.py
文件運行項目時:
python c:\projects\proj1\main.py --user blabla --password 12345678
都好。
現在我使用pyinstaller
創建.exe
文件,這個命令:
py_installer_path\pyinstaller.exe --onefile c:\projects\proj1\main.py
當我嘗試運行它時:
c:\main.exe --user blabla --password 12345678
我收到此錯誤:
usage: main.exe [-h] -u USER -p PASSWORD
main.exe: error: the following arguments are required: -u/--user, -p/--password
編輯
好的,問題出在undetected_chromedriver
上:
init中的文件“undetected_chromedriver_ init _.py”,第 388 行
文件“undetected_chromedriver\dprocess.py”,第 37 行,在 start_detached 文件“multiprocessing\connection.py”,第 255 行,在 recv 文件“multiprocessing\connection.py”,第 310 行,在 _recv_bytes
這個模塊安裝在我的環境中,正如我提到的,當我使用env
文件運行腳本時,它工作.py
。 有什么建議么?
缺少主要代碼時調試起來非常困難。 如果它是敏感代碼,只需創建一個簡單的 function 即可作為示例。 如果將其縮小到幾行代碼,它也可能有助於調試。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.