qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “” even though it was found.

28 篇文章 3 订阅
19 篇文章 0 订阅

在使用visdom进行可视化的时候,遇到了如下错误:

Setting up a new session...
[Errno 111] Connection refused
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" 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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

求助于搜索引擎,发现网上问这个问题的挺多的,真是八仙过海各显神通。

首先使用了 

export QT_DEBUG_PLUGINS=1

然后重新运行程序,看到是

Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libxcb-xinerama.so.0"
"Failed to extract plugin meta data from '/usr/local/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libxcb-xinerama.so.0'"
         not a plugin
QFactoryLoader::QFactoryLoader() looking at "/usr/local/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libxcb-xinerama.so.0.0.0"
"Failed to extract plugin meta data from '/usr/local/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libxcb-xinerama.so.0.0.0'"
         not a plugin
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/bin/platforms" ...
Cannot load library /usr/local/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so: (libxcb-xinerama.so.0: 无法打开共享对象文件: 没有那个文件或目录)
QLibraryPrivate::loadPlugin failed on "/usr/local/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so" : "Cannot load library /usr/local/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so: (libxcb-xinerama.so
.0: 无法打开共享对象文件: 没有那个文件或目录)"
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" 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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

 尝试了各种方法,好几种都不凑效,最终解决方案:

 apt-get install libxcb-xinerama0

 注意最后有个数字0

 

  • 5
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值