1

我正在尝试在我的 Mac OS 10.8.2 上为 Python 2.7.2 安装 SciPy。我更新了 XCode 4.6 并安装了命令行工具。我按照此线程Numpy Installation on Mac 10.8.2中的建议使用 pip 安装了 numpy,并且正在使用 High Performance Computing for Mac 网站 ( http://hpc.sourceforge.net/ )中的 Fortran 编译器。

我可以安装 numpy,但是当我尝试运行内置的 SciPy 单元测试时(如此处 SciPy 的安装文档中所建议的那样,我继续获得 FAIL 以测试基本算术函数。

任何建议将不胜感激。

Python 2.7.2 (default, Jun 20 2012, 16:23:33) 
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> np.test('full')
Running unit tests for numpy
NumPy version 1.6.1
NumPy is installed in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy
Python version 2.7.2 (default, Jun 20 2012, 16:23:33) [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)]
nose version 1.2.1
..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F............................................................................................................................................................................................................................................................................................................................................................................................................................K.................................................................................................K......................K..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................S.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
======================================================================
FAIL: Test basic arithmetic function errors
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/testing/decorators.py", line 215, in knownfailer
    return f(*args, **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/tests/test_numeric.py", line 321, in test_floating_exceptions
    lambda a,b:a/b, ft_tiny, ft_max)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/tests/test_numeric.py", line 271, in assert_raises_fpe
    "Type %s did not raise fpe error '%s'." % (ftype, fpeerr))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/testing/utils.py", line 34, in assert_
    raise AssertionError(msg)
AssertionError: Type <type 'numpy.complex64'> did not raise fpe error ''.

======================================================================
FAIL: test_kind.TestKind.test_all
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/f2py/tests/test_kind.py", line 30, in test_all
    'selectedrealkind(%s): expected %r but got %r' %  (i, selected_real_kind(i), selectedrealkind(i)))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/testing/utils.py", line 34, in assert_
    raise AssertionError(msg)
AssertionError: selectedrealkind(19): expected -1 but got 16

----------------------------------------------------------------------
Ran 3552 tests in 35.919s

FAILED (KNOWNFAIL=3, SKIP=1, failures=2)
<nose.result.TextTestResult run=3552 errors=0 failures=2>
>>> 

相关线程建议使用 Chris Fonnesbeck 的 SciPy Superpack 安装程序脚本,但这似乎是为 OS 10.7 构建的。

我的 gcc 版本是 4.2.1,我的 gfortran 版本是 4.8.0

先感谢您。

4

0 回答 0