[NumPy-Tickets] [NumPy] #1343: ImportError from umath.so on OSX 10.6
NumPy Trac
numpy-tickets@scipy....
Fri Jul 30 11:33:05 CDT 2010
#1343: ImportError from umath.so on OSX 10.6
-------------------------------+--------------------------------------------
Reporter: fonnesbeck_chris | Owner: somebody
Type: defect | Status: closed
Priority: low | Milestone:
Component: Other | Version:
Resolution: worksforme | Keywords:
-------------------------------+--------------------------------------------
Changes (by rgommers):
* priority: normal => low
* status: needs_info => closed
* resolution: => worksforme
Old description:
> For the past several weeks, I have been unable to build a working version
> of Numpy from svn checkout on 64-bit Python on OSX 10.6. The build itself
> is successful, but the resulting package gives an import error:
>
> In [1]: import numpy
> ------------------------------------------------------------
> Traceback (most recent call last):
> File "<ipython console>", line 1, in <module>
> File "/Library/Python/2.6/site-packages/numpy-1.5.0.dev-
> py2.6-macosx-10.6-universal.egg/numpy/__init__.py", line 132, in <module>
> import add_newdocs
> File "/Library/Python/2.6/site-packages/numpy-1.5.0.dev-
> py2.6-macosx-10.6-universal.egg/numpy/add_newdocs.py", line 9, in
> <module>
> from numpy.lib import add_newdoc
> File "/Library/Python/2.6/site-packages/numpy-1.5.0.dev-
> py2.6-macosx-10.6-universal.egg/numpy/lib/__init__.py", line 4, in
> <module>
> from type_check import *
> File "/Library/Python/2.6/site-packages/numpy-1.5.0.dev-
> py2.6-macosx-10.6-universal.egg/numpy/lib/type_check.py", line 8, in
> <module>
> import numpy.core.numeric as _nx
> File "/Library/Python/2.6/site-packages/numpy-1.5.0.dev-
> py2.6-macosx-10.6-universal.egg/numpy/core/__init__.py", line 6, in
> <module>
> import umath
> ImportError: dlopen(/Library/Python/2.6/site-packages/numpy-1.5.0.dev-
> py2.6-macosx-10.6-universal.egg/numpy/core/umath.so, 2): Symbol not
> found: _npy_cexp
> Referenced from: /Library/Python/2.6/site-packages/numpy-1.5.0.dev-
> py2.6-macosx-10.6-universal.egg/numpy/core/umath.so
> Expected in: flat namespace
> in /Library/Python/2.6/site-packages/numpy-1.5.0.dev-
> py2.6-macosx-10.6-universal.egg/numpy/core/umath.so
>
> This has been occurring since at least rev 7726. Here is my build script:
>
> #!/bin/sh
> export MACOSX_DEPLOYMENT_TARGET=10.6
> export CFLAGS="-arch i386 -arch x86_64"
> export FFLAGS="-m32 -m64"
> export LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch i386 -arch
> x86_64"
> export PYTHONPATH="/Library/Python/2.6/site-packages/"
> python setupegg.py config_fc --fcompiler gfortran config
> -L/Users/fonnesbeck/Code/libs build bdist_egg
>
> Following a suggestion, I have also tried without setting LDFLAGS, but
> the same result occurs. Here is the config.h that is generated, if that
> helps:
>
> http://files.me.com/fonnesbeck/d9eyxi
New description:
For the past several weeks, I have been unable to build a working version
of Numpy from svn checkout on 64-bit Python on OSX 10.6. The build itself
is successful, but the resulting package gives an import error:
In [1]: import numpy
------------------------------------------------------------
Traceback (most recent call last):
File "<ipython console>", line 1, in <module>
File "/Library/Python/2.6/site-packages/numpy-1.5.0.dev-
py2.6-macosx-10.6-universal.egg/numpy/__init__.py", line 132, in <module>
import add_newdocs
File "/Library/Python/2.6/site-packages/numpy-1.5.0.dev-
py2.6-macosx-10.6-universal.egg/numpy/add_newdocs.py", line 9, in <module>
from numpy.lib import add_newdoc
File "/Library/Python/2.6/site-packages/numpy-1.5.0.dev-
py2.6-macosx-10.6-universal.egg/numpy/lib/__init__.py", line 4, in
<module>
from type_check import *
File "/Library/Python/2.6/site-packages/numpy-1.5.0.dev-
py2.6-macosx-10.6-universal.egg/numpy/lib/type_check.py", line 8, in
<module>
import numpy.core.numeric as _nx
File "/Library/Python/2.6/site-packages/numpy-1.5.0.dev-
py2.6-macosx-10.6-universal.egg/numpy/core/__init__.py", line 6, in
<module>
import umath
ImportError: dlopen(/Library/Python/2.6/site-packages/numpy-1.5.0.dev-
py2.6-macosx-10.6-universal.egg/numpy/core/umath.so, 2): Symbol not found:
_npy_cexp
Referenced from: /Library/Python/2.6/site-packages/numpy-1.5.0.dev-
py2.6-macosx-10.6-universal.egg/numpy/core/umath.so
Expected in: flat namespace
in /Library/Python/2.6/site-packages/numpy-1.5.0.dev-
py2.6-macosx-10.6-universal.egg/numpy/core/umath.so
This has been occurring since at least rev 7726. Here is my build script:
{{{
#!/bin/sh
export MACOSX_DEPLOYMENT_TARGET=10.6
export CFLAGS="-arch i386 -arch x86_64"
export FFLAGS="-m32 -m64"
export LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch i386 -arch
x86_64"
export PYTHONPATH="/Library/Python/2.6/site-packages/"
python setupegg.py config_fc --fcompiler gfortran config
-L/Users/fonnesbeck/Code/libs build bdist_egg
}}}
Following a suggestion, I have also tried without setting LDFLAGS, but the
same result occurs. Here is the config.h that is generated, if that helps:
http://files.me.com/fonnesbeck/d9eyxi
--
Comment:
Hmm, something must have been fixed, or it was a hardware problem. My
(Intel) iMac is from 2007 and your build script works fine for me.
Closing this issue, if it reoccurs please reopen.
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1343#comment:5>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list