Reputation: 13883
I followed the suggestion here for installing SciPy on Mavericks and ran:
brew install python3
pip3 install virtualenv nose
brew install numpy --with-python3
brew install scipy --with-python3
brew test numpy
brew test scipy
and didn't run into any trouble until the last command, which produced:
Testing scipy
==> python -c import scipy; assert not scipy.test().failures
Python version 2.7.5 (default, Mar 9 2014, 22:15:05) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]
nose version 1.3.4
Traceback (most recent call last):
File "<string>", line 1, in <module>
AssertionError
Error: scipy: failed
Failed executing: python -c import\ scipy;\ assert\ not\ scipy.test().failures
/usr/local/Library/Homebrew/formula.rb:585:in `system'
/usr/local/Library/Taps/homebrew/homebrew-python/scipy.rb:78:in `block (2 levels) in <class:Scipy>'
/usr/local/Library/Homebrew/language/python.rb:25:in `call'
/usr/local/Library/Homebrew/language/python.rb:25:in `block in each_python'
/usr/local/Library/Homebrew/language/python.rb:17:in `each'
/usr/local/Library/Homebrew/language/python.rb:17:in `each_python'
/usr/local/Library/Taps/homebrew/homebrew-python/scipy.rb:77:in `block in <class:Scipy>'
/usr/local/Library/Homebrew/formula.rb:509:in `block in run_test'
/usr/local/Library/Homebrew/extend/fileutils.rb:21:in `mktemp'
/usr/local/Library/Homebrew/formula.rb:507:in `run_test'
/usr/local/Library/Homebrew/cmd/test.rb:59:in `block (2 levels) in test'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/timeout.rb:66:in `timeout'
/usr/local/Library/Homebrew/cmd/test.rb:58:in `block in test'
/usr/local/Library/Homebrew/cmd/test.rb:37:in `each'
/usr/local/Library/Homebrew/cmd/test.rb:37:in `test'
/usr/local/Library/brew.rb:136:in `<main>'
And when I open python3
and type import scipy; scipy.test()
I get hundreds of errors and dozens of failed tests:
FAILED (KNOWNFAIL=276, SKIP=920, errors=326, failures=42)
<nose.result.TextTestResult run=16412 errors=326 failures=42>
What did I do wrong? I had previously installed a bunch of software (like Python), then uninstalled everything and started over, but probably didn't do it so cleanly. Can I salvage this without reinstalling Mavericks?
Meanwhile, Homebrew installed GCC 4.9 as a dependency of NumPy, but that output suggests I'm still using whatever I had installed with XCode. This could be a separate issue, but gcc -v
gives me:
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix
The reason I mention it is that I'd like to know if I caused a bigger problem with my system.
Upvotes: 0
Views: 458
Reputation: 6349
These errors are spurious and may be ignored. This will be fixed in an upcoming release of scipy. The scipy issue explaining this problem is here: https://github.com/scipy/scipy/issues/3853
The Homebrew-python scipy formula now applies the same fix that scipy will apply in the next release; after brew update && brew reinstall scipy
, brew test scipy
will pass.
Upvotes: 2
Reputation: 91
I've run into the same issue using Python 2.7. I've tried a couple of different things:
creating a soft link named "gcc" to gcc-4.9 in /usr/local/bin so that
the brewed version shows up when I do a which gcc
sudo ln -s /usr/local/Cellar/gcc/4.9.2/bin/gcc-4.9 /usr/local/bin/gcc
telling brew to use the default FORTRAN flags:
brew install scipy --default-fortran-flags
I'm still getting the same error as the one you describe in response to brew test scipy
. Running numpy's test suite produced no errors.
Upvotes: 0