jim-easterbrook / python-gphoto2

Python interface to libgphoto2
GNU Lesser General Public License v3.0
362 stars 59 forks source link

ImportError: libgphoto2_port.so.10 #20

Closed sinhau closed 8 years ago

sinhau commented 8 years ago

Hi. I just upgraded libgphoto2 and gphoto2 to following versions:

gphotot2: 2.5.10 libgphotot2: 2.5.10 libgphoto2_port 0.12.0

Also, I installed python-gphoto2 via pip, and it installed the 1.4.1 version.

However, when I import gphoto2 in python, I get the following error:

ImportError: libgphoto2_port.so.10: cannot open shared object file: No such file or directory

In /usr/local/lib, I see libgphoto2_port.so.12 file. Is python-gphoto2 not compatible with the latest version of libgphoto2 and libgphoto2_port?

Thanks!

sinhau commented 8 years ago

UPDATE: I was able to solve the issue by cloning the repository and manually setting up everything as outlined in the 'Install from GitHub (SWIG required)' section of the wiki.

jim-easterbrook commented 8 years ago

I don't think you should have needed to build from source - just reinstalling via pip should have worked. During pip installation the SWIG output (C language) is compiled and linked with your installed libgphotot2 and libgphoto2_port to create Python extension modules. If you move one of these (by upgrading) then the Python extensions won't be able to find them untill they're rebuilt. I'll add a note about this to the README.