[PyQT] Could not load the Qt platform plugin "windows" in "" even though it was found. 에러 해결

2022. 7. 11. 20:15프로젝트 로그/테스트x솔루션 JIG 개발기

반응형

Could not load the Qt platform pluin 에러

프로젝트를 진행 하는 중, 갑자기 아래와 같은 에러가 발생하면서 PyQT 프로젝트가 실행되지 않는 문제가 발생 했다.

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, webgl, windows.

 

 

해결 방법

아래와 같은 시스템 변수를 추가 해서 PyQT5의 plugin 중 ploatforms를 추가하니 문제 없이 정상적으로 프로젝트가 실행 되었다.

 

아나콘다가 설치되어 있는 경로의 site-packages에서 PyQT5의 platforms 폴더를 시스템 변수에 등록 한다.

D:\anaconda3\Lib\site-packages\PyQt5\Qt5\plugins\platforms

 

 

 

 

정상적으로 프로그램이 실행되는 화면

반응형