运行python代码报错:
问题发现:
问题其实十分的狗血,这个代码是在服务器上运行的,运行之前其实并没有看具体的代码情况,git clone 下载下来就直接运行了,原来这个代码需要进行图片绘制,说直白些就是需要显示屏,于是解决方法也十分简单,就是换个带桌面的电脑或者使用虚拟屏幕xvfb。
参考:
Ubuntu Server无桌面无显示器情况下虚拟屏幕xvfb的安装及设置—ubuntu18.04server服务器系统下为python安装虚拟显示器 (使用jupyter notebook在web端播放openai的gym下保存的运行视频——需安装ipython)
======================================================
- NoSuchDisplayException quot connect python pygletnosuchdisplayexception quot connect python server socket quot connections messagingexception quot exception connect quot connection decoding docker quot multiprocessing connection oserror 10252 quot connection 127 quot connection attributes truncated err_proxy_connection_failed quot connection quot ansible changed connect quot available install connect