1

I am attempting to install the scipy (Scientific Python, including matplotlib) package using homebrew, and I noticed that it fails when it needs to install a dependency (gcc version 4.9.0).

I attempted to install it on multiple OSX versions, and even a manual method, but the error always occurs at "make bootstrap" portion.

First method:

brew tap Homebrew/versions
brew install gcc49

Result:

make[4]: *** [all-multi] Error 2
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-stage1-target-libsanitizer] Error 2
make[1]: *** [stage-bubble] Error 2
make: *** [bootstrap] Error 2

Second Method:

wget ftp://ftp.gnu.org/gnu/gcc/gcc-4.9.1/gcc-4.9.1.tar.bz2
gunzip gcc*.bz2
tar -xf gcc*.tar
./configure --prefix=/usr/gcc-4.9.1 --with-gmp=/usr/local/Cellar/gmp/6.0.0a --with-mpr=/usr/local/Cellar/mpfr/3.1.2-p8 --with-mpc=/usr/local/Cellar/mpc/0.26 --program-suffix=4.9.1 --enable-languages=c,c++,fortran --with-system-zlib --enable-stage1-checking --enable-plugin --enable-lto --disable-multilib

Result: Similar output to first one at the end of output.

Anyone know how to install this correctly, or do I need to use xcode? Will that even work with the scipy package installed through homebrew?

---------- UPDATE -----------

Tried suggestions. That is the "brew install gcc" and "brew install scipy"

It fails at installing gcc either way, after doing those commands I get the following.

==> Installing dependencies for scipy: gcc, numpy
==> Installing scipy dependency: gcc
==> Downloading http://ftpmirror.gnu.org/gcc/gcc-4.9.1/gcc-4.9.1.tar.bz2
Already downloaded: /Library/Caches/Homebrew/gcc-4.9.1.tar.bz2
==> ../configure --build=x86_64-apple-darwin14.0.0 --prefix=/usr/local/Cellar/gcc/4.9.1 --enable-languages=c,c++,objc,obj-c++,fortran -
==> make bootstrap
mkdir common
mkdir common/.deps
config.status: executing default commands
make[1]: *** [stage2-bubble] Error 2
make: *** [bootstrap] Error 2

READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting

These open issues may also help:
gcc: compatibility 10.10 (https://github.com/Homebrew/homebrew/pull/31466)
gcc 4.8.3 bottle has invalid omp.h header (https://github.com/Homebrew/homebrew/issues/29670)
MacOS.(gcc|clang|llvm)_version can return nil (https://github.com/Homebrew/homebrew/issues/18781)
3
  • Those errors are not sufficient to see - we need the first error - You do need Xcode to compile the gcc package in Homebrew
    – mmmmmm
    Aug 17, 2014 at 22:51
  • The error message is too terse. And why don't you just install the bottled version brew install gcc?
    – Siyuan Ren
    Aug 18, 2014 at 2:36
  • Are you trying to install on Yosemite? Aug 18, 2014 at 7:35

3 Answers 3

2

It's caused by your new OS X Yosemite, try the following command to install gcc on Yosemite

    brew install https://raw.githubusercontent.com/denji/homebrew/gcc/Library/Formula/gcc.rb
1

This worked for me, installing all dependencies including gcc 4.9.1.

brew tap homebrew/python
brew install scipy
-1

Looks like I solved the problem partially by first installing freetype, then doing pip install matplotlib. scipy still doesn't install though.

brew install freetype
pip install matplotlib

Now, when I type gcc --version in the console, I get a reference to Apple LLVM version 6.0 (clang-600.0.45.3). Hopefully this works for what I need.

1
  • No, it seems like when I go to try: <br> brew install scipy or pip install scipy, I get errors. It tells me that I need gfortran. Doing a brew install gfortran then tells me that it comes with gcc and to just do a brew install gcc. Dead end!
    – npderi
    Aug 18, 2014 at 3:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .