scipy无法安装在mac osx 10.10上

时间:2015-02-11 11:41:12

标签: python macos scipy ipython

我无法在我的Mac上安装scipy。

我在scipy之前安装了以下内容

  • pip install --upgrade numpy
  • brew install gfortran
  • pip install scipy

我搜索了许多解决方案,但所有解决方案都不适用于我。

控制台上的错误(pip install scipy)

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: archive member: build/temp.macosx-10.8-x86_64-2.7/libarpack_scipy.a(dlahqr.o) cputype (7) does not match previous archive members cputype (16777223) (all members must match)

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: archive member: build/temp.macosx-10.8-x86_64-2.7/libarpack_scipy.a(slahqr.o) cputype (7) does not match previous archive members cputype (16777223) (all members must match)

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: archive member: build/temp.macosx-10.8-x86_64-2.7/libarpack_scipy.a(zlahqr.o) cputype (7) does not match previous archive members cputype (16777223) (all members must match)

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: archive member: build/temp.macosx-10.8-x86_64-2.7/libarpack_scipy.a(wrap_g77_abi_f.o) cputype (7) does not match previous archive members cputype (16777223) (all members must match)

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: archive member: build/temp.macosx-10.8-x86_64-2.7/libarpack_scipy.a(wrap_accelerate_f.o) cputype (7) does not match previous archive members cputype (16777223) (all members must match)

error: Command "ranlib build/temp.macosx-10.8-x86_64-2.7/libarpack_scipy.a" failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/local/opt/python/bin/python2.7 -c "import setuptools, tokenize;__file__='/private/var/folders/n5/b8s03z3d7ljg5w74qxm_k4500000gn/T/pip_build_hsu-wei-cheng/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/n5/b8s03z3d7ljg5w74qxm_k4500000gn/T/pip-0Ik3cE-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/n5/b8s03z3d7ljg5w74qxm_k4500000gn/T/pip_build_hsu-wei-cheng/scipy
Traceback (most recent call last):
  File "/usr/local/bin/pip", line 9, in <module>
    load_entry_point('pip==1.5.6', 'console_scripts', 'pip')()
  File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/__init__.py", line 185, in main
    return command.main(cmd_args)
  File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/basecommand.py", line 161, in main
    text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 51: ordinal not in range(128)

2 个答案:

答案 0 :(得分:0)

我通常使用MacPorts在MacOS X中安装Scipy。这里提供了说明

http://www.scipy.org/install.html

我不确定您是否需要链接定义中包含的所有模块,但无论如何它们只是基础。

答案 1 :(得分:0)

我更喜欢通过 pip 安装scipy,但它失败了。

这是MacPorts的解决方法。

成品。