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 Commented 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? Commented Aug 18, 2014 at 2:36
  • Are you trying to install on Yosemite? Commented Aug 18, 2014 at 7:35

4 Answers 4

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
0

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! Commented Aug 18, 2014 at 3:57
-1

If you haven't resolved this, my suggestion is to switch to MacPorts as package manager for old OSX < 10.13. My experience is that 'brew' is no longer workable for my iMac running 10.11.6.

1
  • 1
    This does not answer the question, though your sentiment is well-intended. Please note that the question is 10 years old, and will be relevant to the brew package's state at the time. Not all ancient references to brew related problems should be solved by a blanket switch to MacPorts, which itself is less 'bleeding-edge' than brew. This is likely intentional as it supports a wider range of macOS versions, as you've found... Commented Mar 14 at 14:59

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.