views:

380

answers:

2

I'd like to use the nltk toolkit on my machine which runs Ubuntu 9.04. I installed python 2.6.4 and several additional packages (numpy, scipy, matplotlib and of course nltk). I can import nltk, but calling a few methods gives various error masseges, all contain "please install Tkinter library". Googling around I discovered from http://wiki.python.org/moin/TkInter that I should set my pythonpath environment variable. However I couldn't find out how to do this after searching for hours.

+2  A: 

Sounds like you forgot to install the appropriate TkInter when you installed Python 2.6.4. Install it from the same source.

Ignacio Vazquez-Abrams
+1  A: 

Tkinter is usually included with the python standard libraries but Ubuntu left it out of the regular python package. You just need to install the python-tk package.

sudo apt-get install python-tk
John