运行程序出现这个提示,应该怎么解决?

本级系统:ubuntu 20.04
compaq电脑cq40



import numpy as np
import matplotlib.pyplot as mp

x=np.array([1,2,3,4,5,6])
y=np.array([28,83,91,45,32,12])
mp.plot(x, y)
mp.show()


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.

参考一下:


如果对你有帮助,可以点击我这个回答右上方的【采纳】按钮,给我个采纳吗,谢谢