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'
导入应该是import tkinter
: https : //docs.python.org/3.8/library/tkinter.html#tkinter-modules
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.