Tkinter: "Python may not be configured for Tk"

Maciej Ziarko picture Maciej Ziarko · Mar 28, 2011 · Viewed 133.7k times · Source

Today I wanted to start working with Tkinter, but I have some problems.

Python 3.2 (r32:88445, Mar 28 2011, 04:14:07) 
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from tkinter import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.2/tkinter/__init__.py", line 39, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter

So how can I configure my Python 3.2 to work with Tkinter?

Answer

Jabba picture Jabba · Apr 27, 2016

Under Arch/Manjaro just install the package tk:

sudo pacman -S tk