简体   繁体   中英

Install tkinter on Python3 ubuntu

I am installing tkinter on python3 by running: $ sudo apt-get install python3-tk

This returns (translated): $ python3-tk is already in its latest version (3.6.9-1~18.04)

However, when I run:

from tkinter import ttk

I get the following error message:

ImportError: cannot import name 'ttk'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM