
On Fri, Jul 22, 2011 at 4:52 AM, Mark Higgins <miggins@gmail.com> wrote:
I just tried to set up numpy on a new laptop with Mac OS X Lion (10.7) and am running into some problems.
Any suggestions?
On a freshly upgraded-to Lion installation: $ which python /usr/bin/python $ python Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05) [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import numpy numpy.__version__ '1.5.1' numpy.__file__ '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/__init__.py'
If you need the latest release, instead of the Apple supplied version 1.5.1: $ sudo easy_install -U numpy --SNIPPED-- $ python Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05) [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import numpy numpy.__version__ '1.6.1' numpy.__file__ '/Library/Python/2.7/site-packages/numpy-1.6.1-py2.7-macosx-10.7-intel.egg/numpy/__init__.pyc' numpy.int_ <type 'numpy.int64'>
Consider using 'pip' instead of 'easy_install', for adding and searching PyPI packages: $ sudo easy_install pip $ sudo pip search numpy If you need a newer python later on, consider using Homebrew (after installing Xcode 4.1): http://mxcl.github.com/homebrew/ http://github.com/mxcl/homebrew/wiki/Installation # Note that Homebrew does *not* need to use 'sudo', and after installing python # both 'pip' and 'easy_install' will be the Homebrew installed versions... $ ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)" $ brew update $ brew install python $ hash -r $ python Python 2.7.2 (default, Jul 22 2011, 10:32:09) [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin Type "help", "copyright", "credits" or "license" for more information. $ pip install --upgrade numpy etc... -Chad