如何在Mac OS X雪豹上更新Numpy?

2024-05-29 03:04:33 发布

您现在位置:Python中文网/ 问答频道 /正文

如何将Numpy更新为最新版本?我应该从这里下载.dmg文件吗:

http://sourceforge.net/projects/numpy/files/

这是10.5的dmg吗?我已经按照以下说明安装了numpy:

http://www.scipy.org/Installing_SciPy/Mac_OS_X

我现在的数字是1.2.1。我在MacOSX10.6.1雪豹上运行。谢谢!


Tags: 文件org版本numpyhttpnetwwwfiles
3条回答

如其他地方所建议的,macports在多个架构上运行良好,MacOsX+的版本允许更新等:

$ port search numpy
py-numpy @1.3.0 (python)
    The core utilities for the scientific library scipy for Python

py25-numpy @1.3.0 (python)
    The core utilities for the scientific library scipy for Python

py25-symeig @1.4 (python, science)
    Symeig - Symmetrical eigenvalue routines for NumPy.

py26-numpy @1.3.0 (python)
    The core utilities for the scientific library scipy for Python

py26-scikits-audiolab @0.10.2 (python, science, audio)
    Audiolab is a python toolbox to read/write audio files from numpy arrays

Found 5 ports.
$

在您的情况下,只需发布:

$ sudo port install py26-numpy

或者,如果您想/需要自己编译,HJBlog中的指令非常有用。我测试了matplotlib的64位版本,可以很容易地编译它。

sudo easy_install -U numpy

通过setuptools安装将在sys.path上获得非系统实用程序的新numpy(我听说一些苹果实用程序依赖于系统numpy)。一般来说,setuptools会在OS X上“做正确的事情”

请改用pip install -U numpy,因为easy_install已被弃用,取而代之的是pip

相关问题 更多 >

    热门问题