468,117 Members | 1,580 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,117 developers. It's quick & easy.

C extension modules in Python

Hello,

I'vre written an extension module to accelarate some code i've made in
python with numarray. Then i compiled an linke d it with swig, my
problem is that when i make the import in my python code it gives me an
error: ImportError: libnumarray.so: cannot open shared object file: No
such file or directory

does anyone know why this hapens and how can i solve it?

Oct 22 '05 #1
2 1324
<lu**********@gmail.com> wrote:
Hello,

I'vre written an extension module to accelarate some code i've made in
python with numarray. Then i compiled an linke d it with swig, my
problem is that when i make the import in my python code it gives me an
error: ImportError: libnumarray.so: cannot open shared object file: No
such file or directory

does anyone know why this hapens and how can i solve it?


It seems that the libnumarray.so (which your extension is probably
trying to load) is not in a directory where your system will like
loading it from. It's hard to say more without knowing about your
system, and the way you've set things up for it in terms of loading of
dynamic libraries (which IS a very system-dependent thing).
Alex
Oct 23 '05 #2
lu**********@gmail.com wrote:
Hello,

I'vre written an extension module to accelarate some code i've made in
python with numarray. Then i compiled an linke d it with swig, my
problem is that when i make the import in my python code it gives me an
error: ImportError: libnumarray.so: cannot open shared object file: No
such file or directory

does anyone know why this hapens and how can i solve it?


Are you using distutils to compile and link your extension? You should be.

Are you trying to directly link against libnumarray.so (i.e. by passing
the "-lnumarray" option to the linker)? You shouldn't be.

--
Robert Kern
rk***@ucsd.edu

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter

Oct 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

36 posts views Thread by Tim Churches | last post: by
reply views Thread by Mark English | last post: by
reply views Thread by stefvienna | last post: by
3 posts views Thread by nnorwitz | last post: by
15 posts views Thread by kyosohma | last post: by
13 posts views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.