ImportError: Inappropriate file type for dynamic loading

I am having some problems with scipy on an Intel Mac. It built and installed fine, but when I try to load various components, I get the following error messages: ---------------------------------------- Python 2.4.3 (#1, Apr 7 2006, 10:54:33) [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import scipy Overwriting info=<function info at 0x12b3270> from scipy.misc (was <function info at 0x1288930> from numpy.lib.utils) import scipy.interpolate Traceback (most recent call last): File "<stdin>", line 1, in ? File "/data/apps/python//lib/python/scipy/interpolate/__init__.py", line 7, in ? from interpolate import * File "/data/apps/python//lib/python/scipy/interpolate/interpolate.py", line 13, in ? import fitpack File "/data/apps/python//lib/python/scipy/interpolate/fitpack.py", line 34, in ? import _fitpack ImportError: Inappropriate file type for dynamic loading
It seems that python is having difficulty loading libraries derived from fortran/c sources, but I am having a very difficult time trying to figure out why or how to fix this. I was having some issues earlier with numpy extensions, but was able to get numpy to build an install cleanly after ensuring that there were no spurious libraries around (I have installed some previously pre-compiled version of numpy and scipy that worked fine). I have verified that the appropriate file _fitpack.so in this case is being regenerated, but it still cannot be loaded. I was hoping I could see exactly how it was generated, but this information seems to be hidden deep within the distribution utilities and I do not know how to explore this easily. I am having related problems when trying to use f2py to generate simple fortran modules, so I suspect that something is messed up with my fortran compiler, but the compiler seems to work (the library is generated...) Any suggestions about how I can try to diagnose and fix this problem? Michael.

The problem was an errant version of g77 on my path that was being used. Once everything was recompiled with the same compiler (gfortran), then things worked fine. Michael. In article <szvveolfrgo.fsf@nt05.phys.washington.edu>, Michael McNeil Forbes <mforbes@nt05.phys.washington.edu> wrote:
I am having some problems with scipy on an Intel Mac. It built and installed fine, but when I try to load various components, I get the following error messages:
---------------------------------------- Python 2.4.3 (#1, Apr 7 2006, 10:54:33) [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import scipy Overwriting info=<function info at 0x12b3270> from scipy.misc (was <function info at 0x1288930> from numpy.lib.utils) import scipy.interpolate Traceback (most recent call last): File "<stdin>", line 1, in ? File "/data/apps/python//lib/python/scipy/interpolate/__init__.py", line 7, in ? from interpolate import * File "/data/apps/python//lib/python/scipy/interpolate/interpolate.py", line 13, in ? import fitpack File "/data/apps/python//lib/python/scipy/interpolate/fitpack.py", line 34, in ? import _fitpack ImportError: Inappropriate file type for dynamic loading
It seems that python is having difficulty loading libraries derived from fortran/c sources, but I am having a very difficult time trying to figure out why or how to fix this.
I was having some issues earlier with numpy extensions, but was able to get numpy to build an install cleanly after ensuring that there were no spurious libraries around (I have installed some previously pre-compiled version of numpy and scipy that worked fine).
I have verified that the appropriate file _fitpack.so in this case is being regenerated, but it still cannot be loaded. I was hoping I could see exactly how it was generated, but this information seems to be hidden deep within the distribution utilities and I do not know how to explore this easily.
I am having related problems when trying to use f2py to generate simple fortran modules, so I suspect that something is messed up with my fortran compiler, but the compiler seems to work (the library is generated...)
Any suggestions about how I can try to diagnose and fix this problem?
Michael.
participants (2)
-
Michael McNeil Forbes
-
Michael McNeil Forbes