Hi. I'm totally new to Python and only have a little experience with C++. So, to begin with, I don't really know what I'm doing. I installed nltk three times - each time it said the installation was successful. But trying to import nltk only results in an error message. I tried what I found on these pages: http://groups.google.c om/group/nltk-users/browse_thread/thread/509dac376bf0630 0?fwc=1 and http://www.nltk.org/download. This is what happened:
Any ideas? I'm sure it's something really simple. ^_^
Thanks!
Code:
Python 2.6.4 (r264:75821M, Oct 27 2009, 19:48:32)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import nltk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named nltk
>>> cd /tmp/nltk-installer
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'cd' is not defined
>>> sudo python setup.py install
File "<stdin>", line 1
sudo python setup.py install
^
SyntaxError: invalid syntax
>>> sudo easy_install -U py
File "<stdin>", line 1
sudo easy_install -U py
^
SyntaxError: invalid syntax
>>>
Thanks!
Comment