ttk present but not found for import
cem.isik at compello.com.tr
cem.isik at compello.com.tr
Tue Jan 22 14:18:25 EST 2019
On Sunday, 20 January 2019 02:01:45 UTC+3, Rich Shepard wrote:
> I've started to learn tkinter as the GUI widget set I'll use from now on.
> While ttk-8.6 is installed here (/usr/lib/tk8.6/ttk), I cannot import it:
>
> $ python3
> Python 3.6.7 (default, Dec 8 2018, 06:22:57)
> [GCC 5.5.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import tkinter
> >>> import ttk
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> ModuleNotFoundError: No module named 'ttk'
> >>>
>
> What have I done incorrectly?
>
> TIA,
>
> Rich
try as below;
import tkinter.ttk as ttk
More information about the Python-list
mailing list