![我无法在 Ubuntu 16.04 上运行 IDLE](https://linux22.com/image/1164655/%E6%88%91%E6%97%A0%E6%B3%95%E5%9C%A8%20Ubuntu%2016.04%20%E4%B8%8A%E8%BF%90%E8%A1%8C%20IDLE.png)
我无法在 Linux 系统上运行空闲程序。我得到以下信息:
Traceback (most recent call last):
File "/usr/bin/idle3", line 5, in <module>
main()
File "/usr/lib/python3.5/idlelib/PyShell.py", line 1544, in main
root = Tk(className="Idle")
File "/usr/lib/python3.5/tkinter/__init__.py", line 1871, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable
答案1
打开终端并运行此命令:export DISPLAY=:0.0
欲了解更多详情,你可以阅读回答