[Tutor] NLTK needs YAML?

kagebatsu kagebatsu at cox.net
Thu Sep 2 22:57:41 CEST 2010



Michael Scharf-6 wrote:
> 
> 
> ImportError: No module named yaml
> 
> So my question is: do I really not have what I need here?  Or is it a
> question of  something not finding something that's there?  Maybe I'm
> using the wrong name somewhere?  Or??
> 
> 
> 

Mike, I've just gotten nltk to work on my iMac. I was having the exact same
problem as you. Perhaps you've already fixed this issue--but maybe someone
else will have the problem, too. 

1. First, you need to install PyYAML, here: http://www.nltk.org/download
(scroll down to where it says install PyYAML). Remember where you extract
PyYAML. 
2. Then, boot up terminal, direct terminal to the correct directory (i.e. cd
/Applications/PyYAML...) and then do: sudo python setup.py install. PyYAML
will install. 
3. After it's installed, direct terminal to the correct directory where
NLTK's setup.py file is located (i.e. cd /Applications/Python\
2.6/tmp/nltk-installer/...) and then do: sudo python setup.py install. NLTK
will install. 
4. Check this by then typing python into terminal and: import nltk at the
prompt. Like the NLTK site says, if after typing import nltk at  the prompt
(>>>) returns silently, your installation was successful. 

Feel free to email me if this doesn't work or you need more help. 

-Brandon
-- 
View this message in context: http://old.nabble.com/-Tutor--NLTK-needs-YAML--tp28348409p29609058.html
Sent from the Python - tutor mailing list archive at Nabble.com.



More information about the Tutor mailing list