今天总算解决了困扰我快一周的问题。
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
尝试了许多解决方法,*
上有许多回答,包括copy plugin、环境变量…
Qt creator fails to open on Windows 10 “no Qt platform plugin could be initialized” - Stack Overflow
下面总结了遇到该问题的诸多教程,可一一尝试。
plugin复制/缺少dll:
-
程序运行时提示This application failed to start because no Qt platform plugin could be initialized.
-
How To Fix No Qt Platform Plugin Could Be Initialized Error - This Application Failed To Start
-
Qt Designer启动显示This application failed to start because no Qt platform plugin could be initializedin
-
this application failed to start because no qt platform plugin could be initialized
环境变量:
-
解决designer运行报错:This application failed to start because no Qt platform plugin could be initialized问题
中文路径:
我记得我差不多全试了一遍,但还是没有解决,我一直是觉得我系统安装的Qt和anaconda中的Qt冲突,后来发现VS2017运行Qt是可以的,就是python中无法运行,所以又开始重新一轮的尝试,毕竟不想换电脑。
终于在把环境变量删除后,重装了Qt、pyqt5后解决了,就是这么玄乎。
pip install pyqt5
pip install qt==5.9.7
所以大家可以一一尝试,重装、plugin、环境变量都可以试一下,不要气馁。