alwbtc
alwbtc

Reputation: 29445

Python: ttk cannot be installed

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?

Upvotes: 2

Views: 2393

Answers (2)

user4510404
user4510404

Reputation: 11

Try this instead:

from Tkinter import *
import ttk

Upvotes: 0

unutbu
unutbu

Reputation: 879321

I think ttk is installed as a top-level import. Try

import ttk

Upvotes: 4

Related Questions