I'm completely new to Python, I'm trying to install NLTK based on http://nltk.org/install.html
I've got everything installed except for numpy
(it says numpy
is optional but when I try to import nltk
, it says there's an error because it couldn't find the numpy
module)
after I run sudo pip install -U numpy
I'm running on a Mac with Mountain Lion, python v2.7.3
I get the following error (I only included the end of log):
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
Has anyone seen this happen?
If you open a command prompt and type gcc
does it run without error? If not, you may need to install XCode (available on the appstore) and then the command line tools (it looks similar to this post) so that you can complete the install for numpy.
Recently I had been seeing this along with:
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
See here to fix:
clang error: unknown argument: '-mno-fused-madd' (python package installation failure)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With