Although I have downloaded ttk
from https://pypi.python.org/pypi/pyttk/ and installed it using:
python setup.py install
and got:
I still can't run my script which uses ttk:
from Tkinter import ttk
ImportError: cannot import name ttk
What is wrong?
I think ttk
is installed as a top-level import. Try
import ttk
Try this instead:
from Tkinter import *
import 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.