Hi,
I have got problems with importing NLTK, and I can't really figure out how I can solve them.
I am following the install instruction of http://nltk.org/install.html, and I have downloaded the file setuptools-0.6c11-py2.7.egg.
I think the problem is that I can't install numpy. Does anybody know or understand why?
Checking from the url http://nltk.org/install.html, it says that installing Numpy is optional.
However, if I try to import NLTK, I receive the following error statement:
(...)
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nltk/metrics/segmentation.py",
line 44, in <module>
import numpy
ImportError: No module named numpySo, it seems that Numpy must be installed.
The problem is that if I try to install Numpy, I get the following error statement:
(...)
File "/private/tmp/pip-build/numpy/numpy/core/setup.py", line 696, in get_mathlib_info
raise RuntimeError("Broken toolchain: cannot link a simple C program")
RuntimeError: Broken toolchain: cannot link a simple C program
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build/numpy
I can't really understand what it is going on, and how I could overcome the problem and get NLTK installed. Could someone help?
Hi. I'm thinking they mean the install of NumPy is optional if you already have it. It's a very common and popular package, so a lot of people do. I'm 99% positive you'll need it for NLTK, so I'd install it. It's very useful in general. :)
--
--
In my opinion this is a bug in NLTK: intructions said numpy is optional and it is not optional ...
--