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

相关推荐
点云-激光雷达-Slam-三维牙齿13 小时前
速度起飞 笔记本电脑6G显卡llama运行Qwen3.6 35BA3B MTP 大模型
人工智能·python·电脑·llama
言乐614 小时前
Python游戏水平测试辅助系统
开发语言·python·游戏·django·pygame
桑榆41615 小时前
双系统(Windows + Ubuntu)安装流程
linux·windows·ubuntu
从零开始学习人工智能20 小时前
【踩坑实录】WSL2 解决 onnxruntime\-gpu ImportError: libcudart\.so\.13 无 CUDA13 运行库问题
python
微小冷21 小时前
pyQT中的文本部件及其区别
pyqt·gui·富文本编辑器·文本输入框·文本浏览器
WWJA王文举21 小时前
I²C通信完整流程详解:START、地址、ACK、数据、Repeated START和STOP一次讲透
c语言·开发语言
卷无止境21 小时前
在 awesome-fastapi 里,哪些库值得一看?
后端·python
zhanghaha13141 天前
Python进阶教程:6_JSON 数据解析 —— 新手完全指南
开发语言·python·json
Python私教1 天前
API 输出模型怎么设计:从 model_dump() 到显式展示层
python·fastapi
Python私教1 天前
本地 AI 工具服务该绑定 127.0.0.1 还是 0.0.0.0?
python·fastapi