[Numpy-discussion] problems installing NumPy on OSX

Arild B. Næss arildna at stud.ntnu.no
Sun Dec 3 14:19:01 EST 2006


Den 3. des. 2006 kl. 18.23 skrev Steve Lianoglou:

>>> 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>

It seems running from the source dir has been the main problem all  
along. It works fine outside (I guess).

I get one error in the test Steve recommends though. But hey, 519 out  
of 520 ain't so bad, is it?

regards,
Arild Næss

======================================================================
FAIL: Ticket #112
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/site-packages/numpy/core/tests/test_regression.py", line  
220, in check_longfloat_repr
     assert(str(a)[1:9] == str(a[0])[:8])
AssertionError

----------------------------------------------------------------------
Ran 520 tests in 8.141s

FAILED (failures=1)
<unittest.TextTestRunner object at 0x78e090>




More information about the NumPy-Discussion mailing list