注:下文中wslng爲用戶文件夾,注意替換
1.FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\wslng\\dist\\main\\astor\\VERSION'
將C:\Users\wslng\AppData\Local\Programs\Python\Python36\Lib\site-packages\astor文件夾複製C:\Users\wslng\dist\main目錄下即可。
2.執行如下命令
pyinstaller D:\Project\CdEnjoy\接觸網識別系統\CatenaryDetection\main.py
--hidden-import PySide2.QtXml
--distpath=D:\Project\CdEnjoy\接觸網識別系統\發佈
--noconfirm
報錯RecursionError: maximum recursion depth exceeded
(1)打開C:\Users\wslng\main.spec,在block_cipher = None這行後面加入
import sys
sys.setrecursionlimit(900000)
(2)再次運行命令
pyinstaller main.spec