Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide tk installation with libXft support in Python installations #7848

Open
FCamborda opened this issue Oct 1, 2024 · 0 comments
Open

Comments

@FCamborda
Copy link

We're trying to use customtkinter (which depends on tkinter, already delivered with the uv Python installation). As seen in this issue, we export the necessary env. variables to get tkinter to work (#7036)

uv python install 3.9
uv venv testenv --python 3.9
BASE_PATH="$(dirname $(dirname $(readlink $(which python))))"
export TK_LIBRARY="$BASE_PATH/lib/tk8.6"
export TCL_LIBRARY="$BASE_PATH/lib/tcl8.6"
uv pip install customtkinter
python

Then call the following code (taken from https://customtkinter.tomschimansky.com)

import customtkinter

def button_callback():
    print("button clicked")

app = customtkinter.CTk()
app.geometry("400x150")

button = customtkinter.CTkButton(app, text="my button", command=button_callback)
button.pack(padx=20, pady=20)

app.mainloop()

The rendering is then quite ugly. Apparently this is a known issue when tk is built without libXft support:
TomSchimansky/CustomTkinter#2596

Could you confirm that this is the case when installing Python in uv? If so, is there a way to include this to make rendering more pleasent to the eyes?

We are using uv 0.4.9 in native Ubuntu 22.04.4 LTS

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant