0

I'm having a terrible time trying to install scipy on my Mac. (I'm running Python 7.2).

When I run

$ pip install scipy

I get a huge number of errors of the form

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: archive member: build/temp.macosx-10.5-fat-2.7/libfwrappers.a(_blas_subroutine_wrappers.o) cputype (16777223) does not match previous archive members cputype (7) (all members must match)

and finally

error: Command "ranlib build/temp.macosx-10.5-fat-2.7/libfwrappers.a" failed with exit status 1

and finally

Command "/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-6BEG2P/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-SxKiK4-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-6BEG2P/scipy

From what I've read about similar problems online it seems to be the result of an incompatibility in some of the tools used to compile scipy (gfortran and gcc?).

What I've tried: upgrading my OS and Xcode+devtools to the latest versions (now running OSX 10.11.1 and Xcode 7.7.1), upgrading pip (now running pip 7.1.2), and installing gfortran.

I've read other questions about pip install scipy difficulties:

but their problems are slightly different. I would consider reinstalling gcc as suggested in one of the threads, but I don't know the best way to go about it.

Any help or insight into the problem would be much appreciated! I feel a bit at loose ends here since I can't even really find evidence of anyone having a similar problem, and I don't know what to do next.

Community
  • 1
  • 1
ekl
  • 1,052
  • 2
  • 9
  • 24
  • 1
    Not what you were asking for, but I strongly recommend using [Anaconda](https://www.continuum.io/downloads). It gives you the whole scientific Python stack and will likely save you a lot of trouble. – Matt Hall Nov 19 '15 at 20:03
  • Unless you know what you're doing, you will have a hard time building numpy/scipy from source on OSX. It is much easier to use pre-packaged binaries instead. kwinkunks already mentioned Anaconda, and [this answer](http://stackoverflow.com/a/12098130/1461210) discusses a few other options. Homebrew is another popular choice for Mac users. – ali_m Nov 21 '15 at 20:42

0 Answers0