So I'm trying to run a python GUI using tkinter from Ubuntu command line, on Windows 10, and get the following error:
brandon@DESKTOP-V5LTF5T:~$ python3 MainApp.py
Traceback (most recent call last):
File "MainApp.py", line 14, in <module>
root = tk.Tk()
File "/usr/lib/python3.6/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
If you are using the matplotlib
library then use this question: _tkinter.TclError: no display name and no $DISPLAY environment variable
However, this question is for people using the tkinter
library only