使用了PySide2替換PyQT5. 所以系統(tǒng)里同時安裝了pyqt和pyside2.
遇到了如下問題奏瞬,見截圖
qt.qpa.plugin: Could not load the Qt platform plugin "windows" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: direct2d, minimal, offscreen, windows.
image.png
將如下文件
\Anaconda3\Lib\site-packages\PySide2\plugins\platforms\qminimal.dll
\Anaconda3\Lib\site-packages\PySide2\plugins\platforms\qoffscreen.dll
\Anaconda3\Lib\site-packages\PySide2\plugins\platforms\qwindows.dll
復制到這個文件夾即可
\Anaconda3\Library\plugins\platforms\
圓滿解決