Guim
Guim

Reputation: 513

Install tkinter on Python3 ubuntu

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'

Upvotes: 1

Views: 2954

Answers (1)

glemaitre
glemaitre

Reputation: 1003

The import should be import tkinter: https://docs.python.org/3.8/library/tkinter.html#tkinter-modules

Upvotes: 1

Related Questions