在linux环境下画图遇到标题的问题,结合几位大佬的文章
paddlepaddle(飞浆)完美解决Matplotlib is currently using agg, which is a non-GUI backend_梁先森的博客-优快云博客最近在入门百度的飞浆深度学习框架,百度上搜寻的结果虽不能直接解决这个问题,但是给予了我一定的启发。下面,我就告诉大家,如何快速解决这个问题。从英文提示来看,在执行次项目时,matplotlib正在使用agg,它不是一个GUI后端。我们平常使用的是‘Qt5Agg’这个后端,https://blog.youkuaiyun.com/lzx159951/article/details/104815279PyQt5 qt.qpa.plugin: Could not load the Qt platform plugin “xcb“ in ““ even though it was found._优快云博客-优快云博客Problem: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
https://blog.youkuaiyun.com/u012308586/article/details/108509503Note:由于过程中装了好几个东西,没有去确认具体是哪个包解决了问题,最后也不需要修改agg为Qt5Agg:
pip install PyQt5
pip install Pyside2
sudo apt-get install libxcb-xinerama0 猜测是这个包起作用