[Numpy-discussion] problems installing NumPy on OSX

Steve Lianoglou lists.steve at arachnedesign.net
Sun Dec 3 12:23:35 EST 2006


>> You got my hopes up for a second there, but I can do neither:
>>
>> Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
>> [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
>> Type "help", "copyright", "credits" or "license" for more  
>> information.
>>>>> from numpy import *
>> Running from numpy source directory.
>>>>> a= array([[1,2,3],[4,5,6]])
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in <module>
>> NameError: name 'array' is not defined
>
> You will get this error running from the numpy source
> directory.  cd to somewhere else.

Lasty .. you don't have to "guess" (too much) if numpy installed  
correctly.

Once you're not running from the source dir (I just checked here, it  
completely doesn't work when I'm in the source dir also), run numpy's  
test suite:

[you@/Users/yourhomedir] $ python

In [1]: import numpy
In [2]: numpy.test(1,1)

You should see the tests fly by and finally get something like:

----------------------------------------------------------------------
Ran 517 tests in 0.450s

OK
Out[2]: <unittest.TextTestRunner object at 0x15daf10>


-steve



More information about the NumPy-Discussion mailing list