当前位置:网站首页>【使用pyside2遇到的问题】This application failed to start because no Qt platform plugin could be initialized.
【使用pyside2遇到的问题】This application failed to start because no Qt platform plugin could be initialized.
2022-08-02 21:28:00 【小唐YiJiaTang】
项目场景:
安装使用pyside2时遇到的问题:
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
问题描述
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
原因分析:
问题是:缺少必要的dll文件,我们给它添加一个系统环境变量就可以.
解决方案:
1.找到安装pyside2的位置,可以通过在Anaconda prompt的当前python环境中输 pip show pyside2

2.找到Location所在文件下的pkugins/platforms,并复制该路径
3.win+r 输入sysdm.cpl
高级–环境变量
新建(w)
变量名QT_QPA_PLATFORM_PLUGIN_PATH
变量值D:\anaconda3\conda\envs\PyTorch\Lib\site-packages\PySide2\plugins\platforms
(刚刚复制的路径,每个人都不一样)
然后一路确定确定确定就可以了
最后重启电脑,就已经ok啦
边栏推荐
猜你喜欢
随机推荐
RuoYi-App启动教程
# 医院管理系统完整项目代码以及数据库建表语句分享
博客主题美化第二弹
JumpServer open source bastion machine completes Loongson architecture compatibility certification
golang 刷leetcode:从栈中取出 K 个硬币的最大面值和
面试官居然问我:删库后,除了跑路还能干什么?
工厂模式理解了没有?
Swin Transformer 论文精读,并解析其模型结构
字节内部技术图谱 惊艳级实用
包管理工具npm- node package management相关知识 、检查包更新、NPM包上传、更换镜像、npm ERR! registry error parsing json
golang刷leetcode: 在每个树行中找最大值
终于明白:有了线程,为什么还要有协程?
golang刷letcode:公平分发饼干
[c] Detailed explanation of operators (1)
golang刷leetcode:统计区间中的整数数目
【STM32学习2】存储器相关概念与操作
Summary of @Transactional transaction invocation and effective scenarios
golang刷leetcode:到达角落需要移除障碍物的最小数目
如何抓住NFT、元|宇|宙新趋势?
I interviewed a 985 graduate, and I will never forget the expression when answering the "performance tuning" question