NumPy installation won't import correctly

2009-12-01 Thread Ethos
I installed NumPy for python 2.6 on my leopard macbook, using the
nifty mac installer they now provide. I have the 2.6 official python
distro installed on my computer, in addition to the 2.5 that is native
on the mac. When I went to test out the installation, with 2.6, it
gave me this:

>>> import numpy
Traceback (most recent call last):
  File "", line 1, in 
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/numpy/__init__.py", line 132, in 
import add_newdocs
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/numpy/add_newdocs.py", line 9, in 
from lib import add_newdoc
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/numpy/lib/__init__.py", line 4, in 
from type_check import *
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/numpy/lib/type_check.py", line 8, in 
import numpy.core.numeric as _nx
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/numpy/core/__init__.py", line 5, in 
import multiarray
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.6/
lib/python2.6/site-packages/numpy/core/multiarray.so, 2): no suitable
image found.  Did find:
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/numpy/core/multiarray.so: unknown required load command
0x8022

The file that it claims it can't find a suitable image for does in
fact exist in that directory. I'm stumped.

Funny thing is, when I imported it using python2.5, it worked just
fine. numpy.test(1,10) ran without a hitch.

Thanks for the help. Please redirect me if this question belongs
elsewhere.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: NumPy installation won't import correctly

2009-12-01 Thread Ethos
On Dec 1, 3:33 am, "Diez B. Roggisch"  wrote:
> Ethos wrote:
> > I installed NumPy for python 2.6 on my leopard macbook, using the
> > nifty mac installer they now provide. I have the 2.6 official python
> > distro installed on my computer, in addition to the 2.5 that is native
> > on the mac. When I went to test out the installation, with 2.6, it
> > gave me this:
>
> >>>> import numpy
> > Traceback (most recent call last):
> >   File "", line 1, in 
> >   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
> > python2.6/site-packages/numpy/__init__.py", line 132, in 
> >     import add_newdocs
> >   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
> > python2.6/site-packages/numpy/add_newdocs.py", line 9, in 
> >     from lib import add_newdoc
> >   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
> > python2.6/site-packages/numpy/lib/__init__.py", line 4, in 
> >     from type_check import *
> >   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
> > python2.6/site-packages/numpy/lib/type_check.py", line 8, in 
> >     import numpy.core.numeric as _nx
> >   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
> > python2.6/site-packages/numpy/core/__init__.py", line 5, in 
> >     import multiarray
> > ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.6/
> > lib/python2.6/site-packages/numpy/core/multiarray.so, 2): no suitable
> > image found.  Did find:
> > /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
> > packages/numpy/core/multiarray.so: unknown required load command
> > 0x8022
>
> > The file that it claims it can't find a suitable image for does in
> > fact exist in that directory. I'm stumped.
>
> > Funny thing is, when I imported it using python2.5, it worked just
> > fine. numpy.test(1,10) ran without a hitch.
>
> Looks like a binary format issue to me. What does
>
> file 
> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/multiarray.so
>
> give you, and how does it compare to
>
> file /Library/Frameworks/Python.framework/Versions/2.6/bin/python
>
> Maybe you need to strip the binaries to your native arch, using lipo.
>
> Diez

I reinstalled numpy, from sourceforge, even though I had already
installed the latest version. Same business. 2.5 imports fine, 2.6
doesn't.

Here's the output of the commands you gave me.

d166-54-tercero-infill-a-1:~ kevin$ file /Library/Frameworks/
Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/
multiarray.so
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/numpy/core/multiarray.so: Mach-O universal binary with 2
architectures
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/numpy/core/multiarray.so (for architecture ppc7400):   Mach-O
bundle ppc
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/numpy/core/multiarray.so (for architecture i386):  Mach-O
bundle i386
d166-54-tercero-infill-a-1:~ kevin$ file /Library/Frameworks/
Python.framework/Versions/2.6/bin/python
/Library/Frameworks/Python.framework/Versions/2.6/bin/python: Mach-O
universal binary with 2 architectures
/Library/Frameworks/Python.framework/Versions/2.6/bin/python (for
architecture ppc):  Mach-O executable ppc
/Library/Frameworks/Python.framework/Versions/2.6/bin/python (for
architecture i386): Mach-O executable i386

I don't know if this helps. Thanks for the help everyone.

Kevin
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: NumPy installation won't import correctly

2009-12-01 Thread Ethos
On Dec 1, 6:37 pm, David Cournapeau  wrote:
> On Wed, Dec 2, 2009 at 11:03 AM, Ethos  wrote:
>
> > I reinstalled numpy, from sourceforge, even though I had already
> > installed the latest version. Same business. 2.5 imports fine, 2.6
> > doesn't.
>
> > Here's the output of the commands you gave me.
>
> Which exact version of mac os x are you using ? (the output of sw_vers
> -productVersion
>  would be fine).
>
> David

ProductName:Mac OS X
ProductVersion: 10.5.8
BuildVersion:   9L30

Kevin
-- 
http://mail.python.org/mailman/listinfo/python-list