Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

tkinter wouldn't work on code-server (remote) #4561

Unanswered
wabbyy asked this question in Ideas
Discussion options

Will this function be added in further version?


/usr/local/bin/python3 /root/AJ-Python/temp/2.py

Traceback (most recent call last):
File "/root/AJ-Python/temp/2.py", line 1, in
import turtle
File "/usr/local/lib/python3.10/turtle.py", line 107, in
import tkinter as TK
File "/usr/local/lib/python3.10/tkinter/init.py", line 37, in
import _tkinter # If this fails your Python may not be configured for Tk
ModuleNotFoundError: No module named '_tkinter'

You must be logged in to vote

Replies: 1 comment

Comment options

I expect you have a remote instance(local ones won't have a big problem since you could just code-server &, sending it into the background and using X forwarding for the display. 😉 trick)
The remote instance doesn't have a GUI. IF you have a local machine with Xorg(the most preferred windowing system in the Linux world), you are in luck. But on a server, it's hard. You'd end up getting a lot of useless software and finally choosing noVNC. Here's my suggestion. Install Xorg onto your machine. Get Xfce or LXDE. After that, install noVNC(people say it's sudo apt update && sudo apt install novnc) and visit port 6080(hope you know how to deal with that).
Maybe you could get to see Tkinter work on code-server. If it's a Docker deployment(expected), add the respective lines to the Dockerfile, make sure it doesn't break(happened a LOT of times).
After that, you can upgrade code-server and enjoy the GUI.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /