I tried to run a nltk code for drawing parse trees. I got the error that tkinter module is not installed.
These are the error messages I got:
1. UserWarning: nltk.draw package not loaded (please install Tkinter library).
   warnings.warn("nltk.draw package not loaded")
2. import _tkinter # If this fails your Python may not be configured for Tk
   ImportError: No module named _tkinter
After some searches I installed the ActiveTcl 8.5.18.0 using this instructions.
But when I try to run my code I still get the sam error. I tried
import Tkinter
but I get the second error message above again.
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 39, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter
I also looked at Tkinter documentations and it is mentioned that the correct installation of Tkinter can be verified by running the following command which again gives me another error.
command: python -m tkinter
error: /usr/local/opt/python/bin/python2.7: No module named tkinter
I found this answers on Stackoverflow for my problem but they are either not very clear or not applicable to my case.
- How to get tkinter working with Ubuntu's default Python 2.7 install? Problems: tk-dev is not available for OS X (it is same as ActiveTcl) and I couldn't figure out how to rebuilt my python using make 
- Tkinter: "Python may not be configured for Tk" Problems: very vague. I don't know what should I do 
please help.
 
     
    