473,326 Members | 2,588 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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 1428
<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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

36
by: Tim Churches | last post by:
If a compiled Python extension module B includes code from some other software A which is licensed only under the GPL, do other Python programmes, C, which import module B also need to be licensed...
0
by: Michael Ströder | last post by:
HI! I'm trying to build Python2.4 on a rather old Debian machine. I only have a shell account there. That's why I'm very limited in my actions. Building _socket fails (see below) although I...
0
by: Mark English | last post by:
Basic problem: If there is a C-extension module in a package and it tries to import another python module in the same package without using the fully qualified path, the import fails. Config:...
0
by: stefvienna | last post by:
Hi group, I'm trying compiling Python-2.4.1 and it fails builing the _socket extension with the following message: building '_socket' extension gcc -pthread -DNDEBUG -g -O3 -Wall...
3
by: nnorwitz | last post by:
If you don't write or otherwise maintain Python Extension Modules written in C (or C++), you can stop reading. Python 2.5 alpha 1 is in the process of being released later today. There are...
0
by: Neal Norwitz | last post by:
If you don't write or otherwise maintain Python Extension Modules written in C (or C++) or embed Python in your application, you can stop reading. Python 2.5 alpha 1 was released April 5, 2006. ...
1
by: Mark Asbach | last post by:
Hi pythonians, I'm one of the maintainers of an open source image processing toolkit (OpenCV) and responsible for parts of the autotools setup. The package mainly consists of four shared...
1
by: Petr Prikryl | last post by:
Do you think that the following could became PEP (pre PEP). Please, read it, comment it, reformulate it,... Abstract Introduction of the mechanism for language extensions via modules...
15
by: kyosohma | last post by:
Hi, I am trying to get a small group of volunteers together to create Windows binaries for any Python extension developer that needs them, much like the package/extension builders who volunteer...
4
by: bhood2 | last post by:
I've come to the conclusion that posting about Embedded Python on the Python forums is a complete waste of time. I hope I can get some useful insights here. I'm looking for some help with...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.