Hi All,
I'm new to the list, and new to Python, but not new to NLP (although a
few years removed from it and from CS generally).
I've gotten IDLE up and have done some hello worlding.
I am now trying to get the NLTK working on an iMac 3.06 GHz Core 2 Duo
running running OS X 10.6.3. The Python version I have up is 2.6.5.
(There may be a slightly older pre-install with faulty IDLE lingering
somewhere on the machine.)
I've installed Macports, and through it I installed NLTK by saying
$ sudo port install nltk
which worked.
But when, in a Python session, I tried to
>>> import nltk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named nltk
is what I got.
Macports says if that happens that I should
$ cd /tmp/nltk-installer
which worked. And that I should then
$ sudo python setup.py install
which yielded
Traceback (most recent call last):
File "setup.py", line 13, in <module>
import nltk
File "/private/tmp/nltk-installer/nltk/__init__.py", line 92, in <module>
from yamltags import *
File "/private/tmp/nltk-installer/nltk/yamltags.py", line 1, in <module>
import yaml
ImportError: No module named yaml
So I did this:
$ port search yaml
And got:
libyaml @0.1.3 (devel)
A YAML Parser.
p5-data-phrasebook-loader-yaml @0.09 (perl)
Abstract your queries ... with YAML!
p5-test-yaml-meta @0.15 (perl)
Validation of the META.yml file in a distribution.
p5-test-yaml-valid @0.04 (perl)
Test for valid YAML
p5-yaml @0.68 (perl)
YAML loader/dumper module
p5-yaml-libyaml @0.32 (perl)
Perl YAML Serialization using XS and libyaml
p5-yaml-syck @0.99 (perl)
A fast, lightweight YAML loader and dumper
p5-yaml-tiny @1.41 (perl)
Read/Write YAML files with as little code as possible
py-yaml @3.05 (python, devel)
YAML 1.1 parser and emitter for Python
py25-yaml @3.08 (python, devel)
YAML 1.1 parser and emitter for Python
py26-yaml @3.08 (python, devel)
YAML 1.1 parser and emitter for Python
rb-bee @0.5.1 (ruby, devel)
Bee is a build tool running YAML files
syck @0.55 (textproc, devel)
An extension for reading and writing YAML
yaml-mode.el @0.0.3 (editors)
An emacs major mode for editing yaml files.
Found 14 ports.
So I then did:
$ sudo port install py26-yaml
---> Computing dependencies for py26-yaml
---> Cleaning py26-yaml
closed and re-opened the terminal, and tried it all again.
But I still got the same
Traceback (most recent call last):
File "setup.py", line 13, in <module>
import nltk
File "/private/tmp/nltk-installer/nltk/__init__.py", line 92, in <module>
from yamltags import *
File "/private/tmp/nltk-installer/nltk/yamltags.py", line 1, in <module>
import yaml
ImportError: No module named yaml
Now I've rebooted, and I can't
$ cd /tmp/nltk-installer
anymore, and the only error I get is
>>> import nltk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named nltk
I don't know what to try next.
Many thanks,
Mike S.
--
You received this message because you are subscribed to the Google Groups "nltk-users" group.
To post to this group, send email to
nltk-...@googlegroups.com.
To unsubscribe from this group, send email to
nltk-users+...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/nltk-users?hl=en.