PyQt5报错:This application failed to start because no Qt platform plugin could be initialized
问题背景:
想使用PyQt5来创建一个可视化窗口,先在pycharm里面安装PyQt5,版本为5.14.0。之后在代码中调用此包:from PyQt5 import QtCore, QtGui, QtWidgets。
问题描述:
代码在运行时报错:
解决方案:
需要添加系统环境变量。
鼠标右键点击此电脑,点击属性->高级系统设置->环境变量,在系统变量中点击新建。
变量名:QT_PLUGIN_PATH
变量值:C:\Users\一眉师傅\AppData\Local\Programs\Python\Python38\Lib\site-packages\
PyQt5\Qt\plugins
比如我自己的:D:\个人程序\pycharm.new\PyCharm 2020.3.2\.idea\package\venv\Lib\site-packages\PyQt5\Qt5\plugins
变量值每个人不同,其为plugins文件夹的位置(一般在安装的PyQt5文件夹中找,如果找不到可以全局搜索)。

添加完环境变量后,记得点击确定后再关闭窗口。
之后需要重启pycharm才会有变化。
PyQt5报错:This application failed to start because no Qt platform plugin could be initialized的更多相关文章
- 【环境搭建】安装pyQt5 在pycharm报This application failed to start because no Qt platform plugin could be initialized的问题
报错:This application failed to start because no Qt platform plugin could be initialized 解决办法: http:// ...
- 解决QT5移植报错:This application failed to start because no Qt platform plugin could be initialized
今天自己基于Pyqt5开发了一个软件,打包成exe后在自己的电脑上运行正常,在其他机器上提示: This application failed to start because no Qt platf ...
- 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问题 今天在装 ...
- This application failed to start because no Qt platform plugin could be initialized
今天在直接运行QT生成的.exe遇到了一个错误:This application failed to start because no Qt platform plugin could be init ...
- is application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem
最近试着了解 c++,接触到了QT,写了一个测试程序,在开发环境下正常后移到非开发环境,报错 网上找资料说是少了platforms文件夹中的dll,把里面所有的dll复制到执行程序目录,还是提示,继续 ...
- pthon-安装新版PyQt5、PyQT5-tool后打不开并Designer.exe提示“This application failed to start because no Qt platform plugin could be initialized.Reinstalling the application the application may fix this program”
最近学习python,安装网上教程一步一步的安装,网上很多帖子都写的非常详细,不由深深感慨多谢各位不辞辛苦的记录,指导着来自新入门的同学. 但是实际安装中,最理想莫过于一次性安装成功,但自己安装就出现 ...
- 发布iOS应用时,Xcode报错:Application failed codesign verification.
如下图,在发布应用时,因为codesign问题卡住了.尝试修改Target中的code sign setting,没有效果. 接着,在Developer Center删除所有证书,甚至包括Apps I ...
- 解决 Qt5 报错 This application failed to start because it could not find or load the Qt platform plugin
QT为了简化生成发布版本,特别提供了工具 "windeplayqt.exe",这个工具在 "...\Qt5.8.0\5.8\msvc2015_64\bin"的目 ...
- quartz集群报错but has failed to stop it. This is very likely to create a memory leak.
quartz集群报错but has failed to stop it. This is very likely to create a memory leak. 在一台配置1核2G内存的阿里云服务器 ...
- cordova编译报错:Execution failed for task ':processDebugResources'
cordova编译报错:Execution failed for task ':processDebugResources' 引发这个错误的最扩祸首就是一个中文命名的文件,不知道什么时候加入的,我写了 ...
随机推荐
- JS Leetcode 278. 第一个错误的版本 题解分析
壹 ❀ 引 本题来自LeetCode的278. 第一个错误的版本,难度简单,端午节就应该做点容易的题目缓解心情,题目描述如下: 你是产品经理,目前正在带领一个团队开发新的产品.不幸的是,你的产品的最新 ...
- React虚拟DOM的理解
React虚拟DOM的理解 Virtual DOM是一棵以JavaScript对象作为基础的树,每一个节点可以将其称为VNode,用对象属性来描述节点,实际上它是一层对真实DOM的抽象,最终可以通过渲 ...
- linux中cron表达式指南
Cron是什么? 简单来讲,cron是基于Unix的系统上的一个实用程序.它使用户能够安排任务在指定的[日期/时间]定期运行.它自然是一个伟大的工具,可以自动运行大量流程,否则需要人工干预. Cron ...
- ORA-22828 输入样式或替换参数超过了32k大小限制
今天调试程序报以下错误: ORA-22828: input pattern or replacement parameters exceed 32K size limit 22828. 00000 - ...
- 问题处理:java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp
问题说明 今天跑spring boot项目,在查看列表数据时后台抛异常了,一看是这玩意: 问题原因 "0000-00-00 00:00:00"在mysql中是作为一个特殊值存在的但 ...
- PrettyTable模块
# 用来生成美观的ASCII格式的表格 pip install prettytable # 导入 from prettytable import PrettyTable # 使用 tb = pt.Pr ...
- 解析Spring中的循环依赖问题:初探三级缓存
什么是循环依赖? 这个情况很简单,即A对象依赖B对象,同时B对象也依赖A对象,让我们来简单看一下. // A依赖了B class A{ public B b; } // B依赖了A class B{ ...
- 【Azure Key Vault】.NET 代码如何访问中国区的Key Vault中的机密信息(Get/Set Secret)
问题描述 使用 .NET Azure.Identity 中的 DefaultAzureCredential 认证并连接到Azure Key Vault中, 在Key Vault 的示例中,并没有介绍如 ...
- 【对比】Gemini:听说GPT-4你小子挺厉害
前言 缘由 谷歌连放大招:Gemini Pro支持中文,Bard学会画画 事情起因: 一心只读圣贤书的狗哥,不经意间被新闻吸引.[谷歌最新人工智能模型Gemini Pro已在欧洲上市 将与ChatGP ...
- Java 练习题(类+调用方法)
1 /* 2 * 3 * 定义一个 PassObject,在类中定义一个方法printAress(),该方法的定义如下: 4 * public void printAreas(Circle c,int ...