Using Python to capture keyboard input

Hello,

I need to capture realtime keyboard input from a keyboard plugged into the USB port. Using Tkinter in Python seemed like a reasonable solution, but i am having trouble installing the Tkinter module with pip.

I am wondering if

A) this is the easiest way to go about it

B) how I might install Tkinter on Linino. Pip is not working, it just hangs on the download/unpacking stage.

I am using:

pip install python-tk

Any help would be greatly appreciated!!