Ubuntu pyinstaller 打包可执行文件时报错:qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

  • 问题
  • 解决办法

问题

Ubuntu pyinstaller 打包可执行文件时,报错:
QFactoryLoader::QFactoryLoader() checking directory path “/home/dyj/CarUI/dist/carmain/platforms” … qt.qpa.plugin: Could not find the Qt platform plugin “xcb” in “” This application failed to start because no Qt platform plugin could be initialized.

解决办法

在自己的主程序代码中加入以下代码:

import os
import PySide2
dirname = os.path.dirname(PySide2.__file__)
plugin_path = os.path.join(dirname, 'plugins', 'platforms')
os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = plugin_path


参考链接:https://blog.csdn.net/ouening/article/details/81093697#commentBox

Ubuntu pyinstaller 打包可执行文件时报错:... qt.qpa.plugin: Could not find the Qt platform plugin “xcb“ in “...相关推荐

  1. idea中 maven打包时时报错User setting file does not exist C:\Users\lenevo\.m2\setting.xml,

    第一种错误 :idea中 maven打包时时报错User setting file does not exist C:\Users\lenevo\.m2\setting.xml, 解决方案如下:将ma ...

  2. Pyinstaller 打包exe 报错 “failed to execute script XXX“的一种解决方案

    Pyinstaller 打包exe 报错 "failed to execute script XXX"的一种解决方案 参考文章: (1)Pyinstaller 打包exe 报错 & ...

  3. pyinstaller打包icon报错

    pyinstaller打包icon报错 用pyinstaller打包exe文件时,是可以设置图标的,但如果没有设置好,就会报错. 我在打包的时候报了一个错 except win32api.error ...

  4. Webpack配置vue打包环境时报错

    Webpack配置vue打包环境时报错,大片飘红 头都大了- ERROR in ./src/App.vue Module build failed (from ./node_modules/_vue- ...

  5. ubuntu安装 pyqt5 报错 xcb找不到 pyinstaller打包open3d报错

    2个错误 QObject::moveToThread: Current thread (0x25b5c20) is not the object's thread (0x5ce7ee0). Canno ...

  6. 解决ubuntu中连接mysql时报错:Access denied for user ‘root‘@‘localhost‘

    在ubuntu安装好mysql后无脑的跟着别人的博客配置了远程访问的权限,然后在连接时报错: itcast@itcast-virtual-machine:/usr/share/mysql$ mysql ...

  7. python 打包exe_python pyinstaller打包exe报错的解决方法

    今天用python 使用pyinstaller打包exe出现错误 环境pyqt5 + python3.6 32位 在导入pyqt5包之前加上如下代码 import sys import os if h ...

  8. Pyinstaller 打包exe 报错 failed to execute script XXX的一种解决方案

    最近用PyQt5写了一个界面小程序,需要打包成exe给到其他windows上使用,一开始使用python 3.7 64位,用pyinstaller打包exe,在64位机上运行正常. 但是目标电脑是32 ...

  9. python 打包 exe_python pyinstaller打包exe报错的解决方法

    今天用python 使用pyinstaller打包exe出现错误 环境pyqt5 + python3.6 32位 在导入pyqt5包之前加上如下代码 import sys import os if h ...

最新文章

  1. Android开发之EditText限制输入中文以及字数长度限制的标准姿势
  2. Comparable and Comparator API
  3. Hutool 工具类
  4. CCNA11月20日战报
  5. vlan绑定_【实操】多VLAN间通信
  6. 【C语言练习】分离英语句子中的单词并统计每个单词出现次数后排序输出
  7. python方差特征选择_特征选择-Filter过滤法(方差)
  8. nginx配置导致ios上传不了图片
  9. 如何优雅地重启go程序--endless篇
  10. Splitter 用法
  11. 概率熵物质混乱能量耗散信息熵
  12. 气炸了!被交通银行这波操作~
  13. mvn No proxies configured downloading directly
  14. 求方程ax2+bx+c=0的实数根
  15. linux下安装apache(详细教程)
  16. Apache构建虚拟主机
  17. SU-03离线语音模块的配置使用
  18. 【Python】读书笔记:Python基础教程-项目1-即时标记
  19. 千篇一律的Python爬虫,大神精心总结的爬虫套路!
  20. SUN 的JDO标准

热门文章

  1. vert.x+java入门_Vert.x入门教程
  2. 27Vert.X框架学习笔记
  3. iOS 基本设备信息查询
  4. 大数据处理两套解决方案
  5. HTML中设定下划线样式并且指定下划线长度
  6. 古人用计算机计算图片,简直黑科技!咱古人2300多年前就用上“计算器”了
  7. 注册kaggle以及手机验证解决人机问题,出现401未认证问题
  8. 220V和380V电器设备电流计算方法
  9. 【apktool正确打包流程】Apktool 打包失败解决办法【解包时必须带上-r参数,表示不解码资源文件】因为资源文件的接码会导致各种问题???
  10. Emlog丨西顾Grace主题免费开源-一款二次元的ACG主题