【发布时间】:2014-11-12 14:34:02
【问题描述】:
我按照here 的建议在 Mavericks 上安装 SciPy 并运行:
brew install python3
pip3 install virtualenv nose
brew install numpy --with-python3
brew install scipy --with-python3
brew test numpy
brew test scipy
直到最后一个命令产生:
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>'
当我打开 python3 并输入 import scipy; scipy.test() 时,我收到数百个错误和数十个失败的测试:
FAILED (KNOWNFAIL=276, SKIP=920, errors=326, failures=42)
<nose.result.TextTestResult run=16412 errors=326 failures=42>
我做错了什么?我之前安装了一堆软件(比如 Python),然后卸载了所有东西并重新开始,但可能没有那么干净。我可以在不重新安装 Mavericks 的情况下挽救这个问题吗?
同时,Homebrew 安装了 GCC 4.9 作为 NumPy 的依赖项,但该输出表明我仍在使用随 XCode 安装的任何内容。这可能是一个单独的问题,但gcc -v 给了我:
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
我提到它的原因是我想知道我是否对我的系统造成了更大的问题。
【问题讨论】:
-
评论:不要听从那个建议。安装 anaconda python 或 enthought canopy,即提供 scipy
-
@GiulioGhirardo 我想使用 Homebrew
-
很公平。我可以问你为什么吗?
-
@GiulioGhirardo 我喜欢把所有东西都放在一个地方。几个月前我刚开始使用 Windows,Program Files 一直在我脑海中浮现。但自从你发表评论以来,我一直在考虑更多,我可能会改变主意。无论哪种方式,我都会在优胜美地之前重新格式化这周,所以也许这无关紧要
-
请将此报告给 scipy 问题跟踪器;这反映了 scipy 中的一个错误。如果您只是“pip install scipy”,您会看到类似的东西吗?此外,您说:“与此同时,Homebrew 安装了 GCC 4.9 作为 NumPy 的依赖项,但该输出表明我仍在使用我在 XCode 中安装的任何内容。”这很正常; Homebrew 安装的 GCC 被命名为 gcc-4.9。
标签: python installation scipy osx-mavericks homebrew