如何在 Windows 子系统(Ubuntu 18.04)上运行 python tkinter?

dar*_*rre 5 python tkinter python-3.x windows-subsystem-for-linux ubuntu-18.04

我正在尝试在我的 Ubuntu (18.04) Windows 子系统上使用 tkinter 运行一个简单的 python 脚本 (3.6.8)。

import tkinter
root = tkinter.Tk()
root.mainloop()
Run Code Online (Sandbox Code Playgroud)

我总是收到以下错误: _tkinter.TclError:没有显示名称并且没有 $DISPLAY 环境变量

我尝试用谷歌的不同提示自行修复它,但我唯一实现的是运行这两个命令后得到一个新的错误代码:

导出显示=0.0

主机+

新错误代码:_tkinter.TclError:无法连接以显示“0.0”

如何在 Ubuntu 上运行 tkinter?

预先非常感谢您的帮助!