PyQt5+python做UI時,使用pyinstaller打包成exe,點擊運行exe文件時,出現This application failed to start because it could not find or load the Qt platform plugin "windows錯誤。
問題是,缺少必要的dll文件,我們找到路徑:C:\ANACONDA\Lib\site-packages\PyQt5\Qt\plugins(這是我的安裝路徑),在此文件夾下找到platforms文件夾,然后拷貝整個文件夾,將其放到與exe相同的路徑下,這時候就可以運行exe了。