/* jquery */ /* jquery accordion style*/ /* jquery init */

22 April 2013

Learn Python - Installing Tkinter

We need a GUI Windows module. However, depending on the type and version of your Raspberry Pi operating system image, the Tkinter module may not be installed by default.

You can easily check this out in a Python interactive session.

Start a new session and enter this statement (ensure there's an uppercase T in Tkinter):

>>> import Tkinter

Did you see an    ImportError: No module named Tkinter    error message?

If you did then follow the installation steps below (which presume you're running the Raspbian Jessie distro or the older Raspbian Wheezy image).

Connect the Raspberry Pi to the Internet, open an LXTerminal window and enter this command:

sudo apt-get install python-tk

If prompted enter the your login password, and reply y to any prompts.

Now we're ready to create GUI apps.

A post from my Learn Python on the Raspberry Pi tutorial.