【Python 踩坑实录】Pycharm “... no Qt platform plugin could beinitialized...”及解决方案

这篇具有很好参考价值的文章主要介绍了【Python 踩坑实录】Pycharm “... no Qt platform plugin could beinitialized...”及解决方案。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。


一、背景

1.问题出现

由于电脑内存不足,前几天对电脑文件进行了整理。Anaoconda3 和 Pycharm占据了较大空间,在整理后发现Pycharm运行代码时会出现弹窗报错(下图),程序也无法继续运行。

“This application failed to start because no Qt platform plugin could beinitialized. Reinstalling the application may fix this problem.”

【Python 踩坑实录】Pycharm “... no Qt platform plugin could beinitialized...”及解决方案


二、尝试解决

在网上搜了好多资料,甚至打算重装Anaoconda3 和 Pycharm。在真正重装之前,有幸看到了这篇帖子:
python之pycharm安装Qt designer、PyUIC、Pyinstaller

三、解决方法

1.安装/重新安装Qt designer

1)打开cmd窗口,输入指令:pip install PyQt5
2)继续输入:pip install pyqt5-tools

2.在Pycharm里进行配置

1).打开pycharm ”File“ -> “Settings“

【Python 踩坑实录】Pycharm “... no Qt platform plugin could beinitialized...”及解决方案
【Python 踩坑实录】Pycharm “... no Qt platform plugin could beinitialized...”及解决方案
在上图Settings界面,选择"Tools"->“External Tools”,
点击右侧界面”+“号进行配置
“Program” 和 "Working directory"路径因人而异,须替换为自己的路径。
【Python 踩坑实录】Pycharm “... no Qt platform plugin could beinitialized...”及解决方案

按照上面的教程,我就做到这一步试了一下,代码可以正常运行,问题解决了。文章来源地址https://www.toymoban.com/news/detail-459834.html

看到最后了,欢迎点赞、收藏、关注三连!

到了这里,关于【Python 踩坑实录】Pycharm “... no Qt platform plugin could beinitialized...”及解决方案的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 问题:This application failed to start because no Qt platform plugin could be initialized. Reinstalling

    例如: 从\\\"C:UsersAdministratorAppDataLocalProgramsPythonPython311Libsite-packages\\\"把“PyQt5”文件夹、“pyqt5_plugins”文件夹复制到\\\"C:UsersAdministratorAppDataLocalProgramsPythonPython311Lib\\\"下。

    2024年02月11日
    浏览(40)
  • this application failed to start because no qt platform plugin could be initialized reinstalling the

    通过chat-GPT检索可以得到 这个错误通常是由于缺少Qt平台插件导致的。要解决这个问题,可以尝试以下方法: 1. 确保你已经正确安装了Qt平台插件。如果你使用的是conda或pip安装的Python,可以尝试重新安装PyQt或PySide。 2. 如果重新安装PyQt或PySide后仍然无法启动应用程序,你可以

    2024年02月15日
    浏览(42)
  • 解决使用PyQt5出现错误This application failed to start because no Qt platform plugin could be initialized

    目录 背景介绍: 解决思路: 版本问题: 检查版本:首先要确定安装版本问题。确定你安装的PyQt5版本支持你下载的python的版本。 降python版本: 下载PyQt5 plugins缺少dll文件问题 环境变量问题 我这个学期开始上图形学,写上机作业第一次用到PyQt5写GUI,写了简单的代码测试工具

    2024年02月11日
    浏览(51)
  • qt.qpa.plugin: Could not load the Qt platform plugin “xcb“

    在服务器远程运行会弹出窗口显示画面的代码时,可能遇到上述报错 首先执行`export QT_DEBUG_PLUGINS=1`,再运行一次导致报错的代码。可以看到详细错误信息,我这里看到具体错误为:  少了这样一个包,但是直接`apt-get update`,`apt-get install libxcb-icccm`是找不到的。此时应该执行

    2024年03月27日
    浏览(32)
  • qt.qpa.plugin:Could not load the Qt platform plugin “xcb“

    提示信息:  错误信息中提到“\\\"/home/zxq/anaconda3/envs/open3d/lib/python3.9/site-packages/cv2/qt/plugins”  解决办法1 :首先按照提示信息的建议“Reinstalling the application may fix this problem.”,卸载原来的opencv,一般都能解决。 解决办法2 :删除上面目录中的libqxcb.so文件即可 解决办法3 :尝

    2024年02月03日
    浏览(41)
  • qt.qpa.plugin: Could not find the Qt platform plugin “windows“ in ““

    使用nuitka打包pyqt5后,运行exe时报错 报错如下: 原因分析 这是由于打包后,pyqt5无法找到插件plugin 导致的。 解决方法 1、先找到虚拟环境中的Pyqt5,比如我的: 2、把Qt5文件夹复制到打包好后的PyQt5文件夹中 亲测有效,如果能够解决你遇到的问题,请帮忙点个赞,顺便收藏下

    2024年02月15日
    浏览(41)
  • qt.qpa.plugin: Could not load the Qt platform plugin “xcb“ in

    兄弟们看看是不是这个错: VScode 80年不出个错,今儿冒出来这个,我也不知道是mmdet配置问题,还是opencv-python的问题,还是VScode的问题hhhh 参考该链接: https://blog.csdn.net/LOVEmy134611/article/details/107212845 把QT的flag打开,我们才能看到报错的详细信息 注意,这个执行后,该环境变

    2024年02月09日
    浏览(31)
  • 关于qt.qpa.plugin: Could not find the Qt platform plugin “windows“ in ““问题的解决

    我再安装matplotlib使用的是anaconda直接安装的,这个包会自带一个QTdesigner,和我原先环境内的pyside2冲突。当我卸载matplotlib后就发生上述报错。 问题很简单,就是程序找不到plugin插件了 向环境变量里添加 这个方案在别的文章里很容易找到 但这个也会出现一个问题,就是自己电

    2024年02月08日
    浏览(46)
  • 2022-12-30 Ubuntu 运行qt creator提示qt.qpa.plugin: Could not load the Qt platform plugin “xcb“

    一、Ubuntu 运行qt creator提示qt.qpa.plugin: Could not load the Qt platform plugin \\\"xcb\\\"   二、解决方案:此处是缺少libxcb-xinerama库 进行安装:  三、成功打开qt creator 四、参考文章 qt.qpa.plugin: Could not load the Qt platform plugin “xcb“ in ““ even though it was found. This appl_南柒的博客-CSDN博客

    2024年02月10日
    浏览(34)
  • Ubuntu20.04下解决Qt出现qt.qpa.plugin:Could not load the Qt platform plugin “xcb“ 问题

    python调用matplotlib.pyplot库进行图形绘制时弹出错误提示: 根据问题描述,能够找到但不能加载Qt平台插件“xcb”;虽然接下来又说重新安装可能能够解决,但还是尽量避免重装吧。 修改配置文件~/.bashrc: 在最末尾添加如下语句,会在执行程序时,列出详细的错误提示: 如下:

    2024年02月04日
    浏览(38)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包