我编写了一个吃豆人游戏,但是当我在Python终端上运行得到以下错误:
aistudio@jupyter-39621-1496749:~/search$ python pacman.py -l tinyMaze -p SearchAgent -a fn=tinyMazeSearch
[SearchAgent] using function tinyMazeSearch
[SearchAgent] using problem type PositionSearchProblem
Traceback (most recent call last):
File "pacman.py", line 680, in
runGames( **args )
File "pacman.py", line 646, in runGames
game.run()
File "/home/aistudio/search/game.py", line 571, in run
self.display.initialize(self.state.data)
File "/home/aistudio/search/graphicsDisplay.py", line 170, in initialize
self.startGraphics(state)
File "/home/aistudio/search/graphicsDisplay.py", line 185, in startGraphics
self.make_window(self.width, self.height)
File "/home/aistudio/search/graphicsDisplay.py", line 265, in make_window
"CS188 Pacman")
File "/home/aistudio/search/graphicsUtils.py", line 72, in begin_graphics
_root_window = tkinter.Tk()
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/tkinter/__init__.py", line 2023, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable
请问这应该如何解决呢?