NoSuchDisplayException: Cannot connect to "None" 해결하기

2021. 9. 8. 23:37꿀팁 분석 환경 설정/파이썬 개발 팁

/opt/conda/lib/python3.8/site-packages/pyglet/canvas/xlib.py in __init__(self, name, x_screen)
    121         self._display = xlib.XOpenDisplay(name)
    122         if not self._display:
--> 123             raise NoSuchDisplayException('Cannot connect to "%s"' % name)
    124 
    125         screen_count = xlib.XScreenCount(self._display)

NoSuchDisplayException: Cannot connect to "None"

 

 sudo apt install xvfb
 sudo apt install ffmpeg
 pip3 install pyvirtualdisplay

 

 

https://stackoverflow.com/questions/40195740/how-to-run-openai-gym-render-over-a-server

728x90