[Numpy-discussion] ImportError: dynamic module does not define init function (initmultiarray)

dpo dominique.orban@gmail....
Wed Aug 24 20:07:33 CDT 2011



dpo wrote:
> 
> ---
> Traceback (most recent call last):
>   File "/Users/dpo/.virtualenvs/matrox/matrox/curve.py", line 3, in
> <module>
>     import numpy as np
>   File
> "/Users/dpo/.virtualenvs/matrox/lib/python2.7/site-packages/numpy/__init__.py",
> line 137, in <module>
>     import add_newdocs
>   File
> "/Users/dpo/.virtualenvs/matrox/lib/python2.7/site-packages/numpy/add_newdocs.py",
> line 9, in <module>
>     from numpy.lib import add_newdoc
>   File
> "/Users/dpo/.virtualenvs/matrox/lib/python2.7/site-packages/numpy/lib/__init__.py",
> line 4, in <module>
>     from type_check import *
>   File
> "/Users/dpo/.virtualenvs/matrox/lib/python2.7/site-packages/numpy/lib/type_check.py",
> line 8, in <module>
>     import numpy.core.numeric as _nx
>   File
> "/Users/dpo/.virtualenvs/matrox/lib/python2.7/site-packages/numpy/core/__init__.py",
> line 5, in <module>
>     import multiarray
> ImportError: dynamic module does not define init function (initmultiarray)
> ---
> 
> So I am lead to ask: should multiarray.so really be called
> _multiarray.so? If not, any idea what the problem is?
> 

If I may answer my own question, the answer is no. The issue here is that
numpy was compiled for the x86_64 architecture only, while other libraries I
need to link with are i386 only. Changing CFLAGS and LDFLAGS to "-arch i386
-arch x86_64" resolved the issue. Sorry for the noise.

Dominique

-- 
View this message in context: http://old.nabble.com/ImportError%3A-dynamic-module-does-not-define-init-function-%28initmultiarray%29-tp32299073p32330873.html
Sent from the Numpy-discussion mailing list archive at Nabble.com.



More information about the NumPy-Discussion mailing list