Got a error while running the app in Docker

TclError: no display name and no $DISPLAY environment variable


File "/usr/local/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/", line 552, in _run_script
    exec(code, module.__dict__)File "/sharuk/", line 9, in <module>
    root = tk.Tk()File "/usr/local/lib/python3.9/tkinter/", line 2270, in __init__ = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)

As long as we don’t see the actual code we can only guess.
But in a headless environment you can’t use Tkinter or any other GUI library that requires a native GUI interface.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.