pyqt5打包报错:qt.qpa.plugin: Could not load the Qt platform plugin “windows“

笔者在将基于pyqt5库开发的界面打包为exe程序后,双击exe文件控制终端报错:

qt.qpa.plugin: Could not load the Qt platform plugin "windows" in "%QTDIR%\plugins\platforms\" 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, windows, webgl.
**原因:**平台找不到插件,其实就是没找到qwindows.dll这个库文件

**解决办法:**手动把 qwindows.dll 复制到exe旁边,就可以运行了,此时插件就在当前目录。

相关推荐
杨杨杨大侠19 小时前
DeepAgents 框架深度解析:从理论到实践的智能代理架构
后端·python·llm
醇氧19 小时前
【Windows】安装mysql8
数据库·windows·mysql
曹牧19 小时前
C#:ToDouble
开发语言·c#
袁袁袁袁满19 小时前
Python读取doc文件打印内容
开发语言·python·python读取doc文件
zcfeng53020 小时前
PHP升级
开发语言·php
m0_7482523820 小时前
Ruby 模块(Module)的基本概念
开发语言·python·ruby
羊小猪~~20 小时前
【QT】-- QT基础类
开发语言·c++·后端·stm32·单片机·qt
子午20 小时前
【2026原创】水稻植物病害识别系统~Python+深度学习+人工智能+resnet50算法+TensorFlow+图像识别
人工智能·python·深度学习
深蓝电商API20 小时前
Scrapy ImagesPipeline和FilesPipeline自定义使用
爬虫·python·scrapy
木卫二号Coding20 小时前
Python-文件拷贝+文件重命名+shutil+记录
开发语言·python