Tutorial :How to set pythonpath (python2.6) for tkinter on Ubuntu 9.04 (to use nltk)?


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.


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


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  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »