Python qt.qpa.xcb: could not connect to display解决办法

遇到问题:qt.qpa.xcb: could not connect to display

Python qt.qpa.xcb: could not connect to display解决办法_第1张图片

解决办法,在命令行输入:

export DISPLAY=:0

然后重新跑python程序,解决!

参考博客:qt.qpa.xcb: could not connect to displayqt.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 -高性能服务器开发

你可能感兴趣的:(Python,开发语言,python)