seekthermal / seekcamera-python

Python language bindings for the Seek Thermal SDK
Apache License 2.0
48 stars 22 forks source link

Failed to load libseekcamera.so from default system paths #18

Open emartin-216 opened 2 years ago

emartin-216 commented 2 years ago

Hi,

I have struggled to run this code, and I believe I'm missing something from the installation instructions that is causing this but I am not sure what. When I try to run pip install -e ., I get permission errors. Could this be causing the code to not work?

Below is the following error message:

Traceback (most recent call last): File "/home/pi/Documents/libseek-thermal-master/examples/seekcamera-python/seekcamera/_clib.py", line 107, in configure_dll _cdll = ctypes.CDLL(lib) File "/usr/lib/python3.7/ctypes/init.py", line 356, in init self._handle = _dlopen(self._name, mode) OSError: libseekcamera.so: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "seekcamera-opencv.py", line 166, in main() File "seekcamera-opencv.py", line 131, in main with SeekCameraManager(SeekCameraIOType.USB) as manager: File "/home/pi/Documents/libseek-thermal-master/examples/seekcamera-python/seekcamera/camera.py", line 543, in init _clib.configure_dll() File "/home/pi/Documents/libseek-thermal-master/examples/seekcamera-python/seekcamera/_clib.py", line 109, in configure_dll raise RuntimeError("Failed to load %s from default system paths" % lib) RuntimeError: Failed to load libseekcamera.so from default system paths

mq-mattiasjuhl commented 2 years ago

It can't find libseekcamer.so

A quick and hacky way to get around this is setting the correct path in _clib.py.

If using the manual install it should be at the path

/usr/local/lib/libseekcamera.so

otherwise try:

whereis libseekcamera.so

Changing the lib variable in (line 97.) _clib.py (your location is "/home/pi/Documents/libseek-thermal-master/examples/seekcamera-python/seekcamera/_clib.py") from:

lib = "libseekcamera.so"

to (or what ever path it is in):

lib = "/usr/local/lib/libseekcamera.so"

blackadj commented 1 year ago

Hi,

When i replace libseekcamera.so by /usr/local/lib/libseekcamera.so, i have the same error. How i can solve this issue ?

Alaa-osamaelsaid commented 5 months ago

I have the same error as well what to do