2009-10-05 114 views

回答

30

sudo easy_install -U numpy

通过setuptools的安装将获得在sys.path中的非系统工具程序(我已经告诉一些苹果公用事业依靠系统numpy的)新numpy的。在一般情况下,setuptools的将“做正确”的事情在OS X

+1

不赞成由奥斯汀指出,你必须先安装http://r.research.att.com/gfortran-4.2.3.dmg。在测试了新安装10.6.4我 – Mark 2010-10-21 20:19:49

+0

有试图 须藤的easy_install -U numpy的 所以我做了如下类似的问题: 须藤的easy_install点子 安装点子。比安装numpy通过'pip' pip安装numpy 哪些工作很好。 – 2012-10-19 13:43:46

4

其他地方建议,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指令是非常有用的。我测试过并可以轻松编译64位版本的matplotlib。

0

由于某种原因,easy_install -U numpy无法正常工作。

import numpy 
print numpy.__file__ 

我下载的是GNU C++编译器从:

print numpy.__version__ 

总是通过查找并删除整个文件夹给1.2.1

所以,我先取出numpy的1.2.1:

http://r.research.att.com/gfortran-4.2.3.dmg

我用的easy_install安装numpy的。

回想起来,如果我安装了Fortran编译器,easy_install -U numpy可能已经工作。

4

使用pip install -U numpy代替,如easy_install的是有利于pip

相关问题