Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Trouble loading dll via ctypes

Reply
Thread Tools

Trouble loading dll via ctypes

 
 
subopt inTheVicinityOf geemail.com
Guest
Posts: n/a
 
      01-29-2008
I'm trying to load a dll via ctypes by doing this:

cdll.LoadLibrary('/path/to/mylib.so')

But i'm getting this:

/path/to/mylib.so: cannot open shared object file: No such file or
directory What am i doing wrong?

The dll in question is in a directory mounted via NSF, but no part of
the path/filename is a symlink. When i try code from the docs:

cdll.LoadLibrary('libc.so.6')

,then all is fine.

I've also tried to set my LD_LIBRARY_PATH before starting Python,
checking it via os.environ, then doing the cdll.LoadLibrary(...), but
that fails with the same complaint. What am i doing wrong?

tia,
Eric
 
Reply With Quote
 
 
 
 
Helmut Jarausch
Guest
Posts: n/a
 
      01-30-2008
subopt inTheVicinityOf geemail.com wrote:
> I'm trying to load a dll via ctypes by doing this:
>
> cdll.LoadLibrary('/path/to/mylib.so')
>
> But i'm getting this:
>
> /path/to/mylib.so: cannot open shared object file: No such file or
> directory What am i doing wrong?
>
> The dll in question is in a directory mounted via NSF, but no part of
> the path/filename is a symlink. When i try code from the docs:
>
> cdll.LoadLibrary('libc.so.6')
>
> ,then all is fine.
>
> I've also tried to set my LD_LIBRARY_PATH before starting Python,
> checking it via os.environ, then doing the cdll.LoadLibrary(...), but
> that fails with the same complaint. What am i doing wrong?
>


I vaguely remember you need execute permissions for a dynamic library to load.
Permissions on an NFS mounted directory are different, especial for user 'root'.

Check if can execute some executable in that NFS path.

Helmut.



--
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to correctly pass “pointer-to-pointer” into DLL via ctypes? Grigory Petrov Python 4 10-27-2012 02:22 PM
ctypes - loading 'librsvg-2-2.dll' Tim Grove Python 0 08-26-2008 08:02 AM
Using Ghostscript DLL via ctypes in Py2.3/Win Adam Twardoch Python 1 07-06-2005 12:50 PM
RE: [ctypes-users] [Ann] ctypes 0.9.0 released Henk Punt Python 0 07-23-2004 10:34 PM
msvcrt.dll, msvcirt.dll, msvcrt20.dll and msvcrt40.dll, explanation please! Snoopy NZ Computing 16 08-25-2003 12:34 PM



Advertisments