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旁边,就可以运行了,此时插件就在当前目录。

相关推荐
喵手2 分钟前
Python爬虫实战:地图 POI + 行政区反查实战 - 商圈热力数据准备完整方案(附CSV导出 + SQLite持久化存储)!
爬虫·python·爬虫实战·零基础python爬虫教学·地区poi·行政区反查·商圈热力数据采集
熊猫_豆豆8 分钟前
YOLOP车道检测
人工智能·python·算法
nimadan129 分钟前
**热门短剧小说扫榜工具2025推荐,精准捕捉爆款趋势与流量
人工智能·python
杜子不疼.12 分钟前
PyPTO:面向NPU的高效并行张量编程范式
开发语言
lly20240612 分钟前
C# 结构体(Struct)
开发语言
默默前行的虫虫14 分钟前
MQTT.fx实际操作
python
YMWM_23 分钟前
python3继承使用
开发语言·python
JMchen12324 分钟前
AI编程与软件工程的学科融合:构建新一代智能驱动开发方法学
驱动开发·python·软件工程·ai编程
梦帮科技36 分钟前
OpenClaw 桥接调用 Windows MCP:打造你的 AI 桌面自动化助手
人工智能·windows·自动化