[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to force the path of a lib ?

(Resend because the previous message was incomplete)


I am working on a python3 binding of a C++ lib. This lib is installed in 
my system but the latest version of this lib introduce several 
incompatibilities. So I need to update my python binding.

I'm working into a virtual environment (py370_venv) python-3.7.0 is 
installed into ./localpythons/lib/python3.7

So, the paths are:
# python-3.7.0
# my binding python -> libexiv2

# and the latest version of libexiv2

All theses path are in the sys.path

Now I test my binding:
 >>> import pyexiv2
Traceback (most recent call last):
 ? File "<stdin>", line 1, in <module>
 ? File 
line 60, in <module>
 ??? import libexiv2python
undefined symbol: _ZN5Exiv27DataBufC1ERKNS_10DataBufRefE

Checking the libexiv2.so the symbol exists
~/CPython/py370_venv/lib$ objdump -T libexiv2.so.0.27.0
000000000012c8d0 g??? DF .text??? 000000000000000f? Base 

But it is not present into my old libexiv2 system, so I presume python use
/usr/lib/x86_64-linux-gnu/libexiv2.so.14.0.0? (The old 0.25) instead of
 ?~/CPython/py370_venv/lib/libexiv2.so.0.27.0 (The latest 0.27)

How can I solve that ?

My sys.path:
['', '/home/vincent/.localpythons/lib/python37.zip', 

Thanks, Vincent