码迷,mamicode.com
首页 > 其他好文 > 详细

解决plt.show()闪退

时间:2018-10-10 22:00:04      阅读:739      评论:0      收藏:0      [点我收藏+]

标签:locate   isp   not   vat   .so   fine   display   glin   lib   

我今天在Linux下进行实验时,发现简单的plt.show()竟然不能显示图片了,一闪就没了。

报错如下:
python: relocation error: /home/magic/anaconda2/plugins/xcbglintegrations/libqxcb-glx-integration.so: symbol _ZNK14QXcbConnection12xlib_displayEv, version Qt_5_PRIVATE_API not defined in file libQt5XcbQpa.so.5 with link time reference

在网上并没有搜索到相关解决方法,于是自己仔细看了一下错误提示。发现是libqxcb-glx-integration.so这个文件没有链接到libQt5XcbQpa.so.5,于是解决方案也就来了。

1.首先定位到/home/magic/anaconda2/plugins/xcbglintegrations/libqxcb-glx-integration.so文件

2.利用locate命令定位出libQt5XcbQpa.so.5文件所在目录。我的如下:

/home/magic/anaconda2/envs/flownet2/lib/libQt5XcbQpa.so.5
/home/magic/anaconda2/envs/flownet2/lib/libQt5XcbQpa.so.5.9
/home/magic/anaconda2/envs/flownet2/lib/libQt5XcbQpa.so.5.9.6
/home/magic/anaconda2/envs/tensorflow/lib/libQt5XcbQpa.so.5
/home/magic/anaconda2/envs/tensorflow/lib/libQt5XcbQpa.so.5.6
/home/magic/anaconda2/envs/tensorflow/lib/libQt5XcbQpa.so.5.6.2
/home/magic/anaconda2/lib/libQt5XcbQpa.so.5
/home/magic/anaconda2/lib/libQt5XcbQpa.so.5.6
/home/magic/anaconda2/lib/libQt5XcbQpa.so.5.6.2
/home/magic/anaconda2/pkgs/qt-5.6.2-2/lib/libQt5XcbQpa.so.5
/home/magic/anaconda2/pkgs/qt-5.6.2-2/lib/libQt5XcbQpa.so.5.6
/home/magic/anaconda2/pkgs/qt-5.6.2-2/lib/libQt5XcbQpa.so.5.6.2
/home/magic/anaconda2/pkgs/qt-5.6.2-5/lib/libQt5XcbQpa.so.5
/home/magic/anaconda2/pkgs/qt-5.6.2-5/lib/libQt5XcbQpa.so.5.6
/home/magic/anaconda2/pkgs/qt-5.6.2-5/lib/libQt5XcbQpa.so.5.6.2
/home/magic/anaconda2/pkgs/qt-5.6.2-h974d657_12/lib/libQt5XcbQpa.so.5
/home/magic/anaconda2/pkgs/qt-5.6.2-h974d657_12/lib/libQt5XcbQpa.so.5.6
/home/magic/anaconda2/pkgs/qt-5.6.2-h974d657_12/lib/libQt5XcbQpa.so.5.6.2
/home/magic/anaconda2/pkgs/qt-5.9.6-h8703b6f_2/lib/libQt5XcbQpa.so.5
/home/magic/anaconda2/pkgs/qt-5.9.6-h8703b6f_2/lib/libQt5XcbQpa.so.5.9
/home/magic/anaconda2/pkgs/qt-5.9.6-h8703b6f_2/lib/libQt5XcbQpa.so.5.9.6
/usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5      #找到此目录
/usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5.5
/usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5.5.1

 

3.利用ln -s软连接两个文件即可。(cd到/home/magic/anaconda2/plugins/xcbglintegrations目录下)

ln -sf /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 libqxcb-glx-integration.so

 

 



 

解决plt.show()闪退

标签:locate   isp   not   vat   .so   fine   display   glin   lib   

原文地址:https://www.cnblogs.com/logo-88/p/9768638.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!