質問

Although I have downloaded ttk from https://pypi.python.org/pypi/pyttk/ and installed it using:

python setup.py install

and got:

enter image description here

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
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top