1

I'm trying to update numpy from version 1.6.2 to 1.8.1. My first attempt was to do

sudo pip uninstall numpy 

and then install it again with pip. But when I check the version I get the old one:

import numpy as np
np.__version__
'1.6.2'

Then, I tried to

sudo easy_install -U numpy

but I get an error: RuntimeError: Broken toolchain: cannot link a simple C program

The path to the numpy version I use is: /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy

So, is the solution to manually install (from source) the desired version of Numpy or is there a way to use pip or easy_install?

Qbite
  • 219
  • 5
  • 14
  • 1
    Do you have developer tools for XCode installed? – favoretti May 06 '14 at 14:54
  • @favoretti, yes I do. – Qbite May 06 '14 at 14:57
  • go to the log file and paste it somewhere, usually there are enough detail there, then we can help. – adrin May 06 '14 at 15:00
  • I guess it can't find your C compiler for some reason. – adrin May 06 '14 at 15:01
  • The error you're getting means that pip can't find your compiler indeed. What would `which gcc` say? – favoretti May 06 '14 at 15:02
  • @favoretti if I do `which gcc` I get `/usr/bin/gcc` – Qbite May 06 '14 at 15:03
  • Have you tried compiling numpy manually? The only thing you need to do (other than make/make install) is to make sure it's compiled as a framework. – Alfalfa May 06 '14 at 15:05
  • Also, I'd very much recommend using brew (http://brew.sh/), since it often contains patches that are MacOSX specific. – favoretti May 06 '14 at 15:07
  • Have you looked into Anaconda or Canopy? Unless you have a specific need to build from source, using a distribution is by far the easiest option. – YXD May 06 '14 at 15:45
  • @MrE you are right, I was trying to avoid Canopy but when you need quick results, it's the easiest way to keep all the packages accessible and updated. – Qbite May 07 '14 at 08:02
  • Check the fix here: http://stackoverflow.com/questions/22313407/clang-error-unknown-argument-mno-fused-madd-python-package-installation-fa – ojy May 14 '14 at 22:32

0 Answers0