New issue 527 by StevenBird1: Installing NLTK on Mac
http://code.google.com/p/nltk/issues/detail?id=527
Please update this ticket with any problems relating to installation of
NLTK on Macintosh computers.
OS version: 10.?.?
NLTK version:
Python version
What problem did you encounter with installation?
Did you find any fixes? Please suggest ways to improve our installation
instructions.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
Hi Steven
Mac OS 10.4.11
Python 2.5.4 (r254:67917, Dec 23 2008, 14:57:27)
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
Macports installed
john-newmans-computer:~ johnnewman$ sudo port install py26-nltk
Password:
---> Computing dependencies for py26-nltk
---> Building tk
Error: Target org.macports.build returned: shell command " cd
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/
work/tk8.5.8/unix" && /usr/bin/make -j2 all " returned error 2
etc etc etc
Error: The following dependencies failed to build: tk
Error: Status 1 encountered during processing.
In Python 2.5.4
>>> import nltk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named nltk
John
Since you have Python 2.5, please install py25-nltk, not py26-nltk.
Results with py25-nltk:
john-newmans-computer:~ johnnewman$ python
Python 2.5.4 (r254:67917, Dec 23 2008, 14:57:27)
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
john-newmans-computer:~ johnnewman$ sudo port install py25-nltk
---> Computing dependencies for py25-nltk
---> Building tk
Error: Target org.macports.build returned: shell command " cd
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.8/unix"
&&
/usr/bin/make -j2 all "
returned error 2
.....many such lines...
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.8/unix/../generic/tk3d.c:1373:
error:
parse error before ')' token
make: *** [tkArgv.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [tk3d.o] Error 1
Error: The following dependencies failed to build: py25-matplotlib
py25-configobj python25 tk py25-dateutil py25-setuptools py25-tz py25-numpy
atlas
gcc43 gmp mpfr gzip py25-nose py25-pyobjc-cocoa py25-pyobjc py25-py2app
py25-altgraph py25-bdist_mpkg py25-macholib py25-modulegraph py25-
pyobjc2 py25-pyobjc2-cocoa py25-yaml
Error: Status 1 encountered during processing.
Before reporting a bug, first run the command again with the -d flag to get
complete output.
Howdy-
I performed a manual installation of NLTK on a Mac, which supposedly went
through successfully. When I go
to "import nltk" either through IDLE or the command line, though, no module
is detected. Any advice is much
appreciated.
(In the manual installation, I'm installing NLTK straight to the general
hard disk. Does it need to go somewhere
else, i.e. the python folder?)
Thanks-
Steve
Comment #5 on issue 527 by StevenBird1: Installing NLTK on Mac
http://code.google.com/p/nltk/issues/detail?id=527
You probably have two versions of Python, with NLTK installed in one of
them, while you're using the other one.
Please see the thread on nltk-users for suggestions for what to do:
http://groups.google.com/group/nltk-users/browse_thread/thread/e14b647243ca5b66
Hi,
I have the same problem: I installed MacPorts and NLTK (using "sudo port
install python26"), but the importation fails:
IDLE 2.6.1
>>> import nltk
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import nltk
ImportError: No module named nltk
Many thanks in advance for your help!
Robin