[Zope-dev] Error by using libraries with an external method

Leonardo Rochael Almeida leo@hiper.com.br
24 Jun 2002 10:09:16 -0300


On Fri, 2002-06-21 at 17:25, Juliette Colmant wrote:
> > > [...]
> > > Error Type: ImportError
> > > Error Value: ./test.so: cannot open shared object
> > > file: No such file or directory
> 
>  --- Leonardo Rochael Almeida <leo@hiper.com.br>
> > You probably need to put your library in the
> > PYTHONPATH of Zope. The
> > usual place is
> > <zope-root>/lib/python2.1/site-packages
> > 
> > Putting it in the Extesions directory, so that it
> > can be imported by
> > external methods, doesn't seem to work, even if you
> > put Extensions in
> > the PYTHONPATH, at least in my experience.
> 
> I've tried to put the module and the librarie I use in
> the directory you gave me but I  have still the same
> error.
> Actually, I have a module that use a library. Zope has
> no problem about the module. The problem is about the
> library...
> If you have an other idea?

I'm assuming that you mean the *module* is an extension library (i.e. a
.so file that is imported by your python code) and the *library* is
another .so that is needed by that module. In this case, the module must
be in the PYTHONPATH just as I mentioned, but the library must be in
your machine dynamic linker path. Take a look at the ld.so man page
("man ld.so") and, if your machine runs Linux, at the file
/etc/ld.so.conf and the ldconfig man page ("man ldconfig"). You may need
to configure the LD_LIBRARY_PATH environment variable.

Cheers, Leo

ps: when replying to help posts, please also reply to the list, not just
the original poster. Actually, it's better if you just reply to the
list, as the original poster will already receive the message.

-- 
Ideas don't stay in some minds very long because they don't like
solitary confinement.