Python Wrapper: Check LD_LIBRARY_PATH for PT-104

Having problems ? let us know the details here
Post Reply
anhermann
Newbie
Posts: 1
Joined: Wed Jun 19, 2024 7:56 pm

Python Wrapper: Check LD_LIBRARY_PATH for PT-104

Post by anhermann »

I'm a brand new user to pico products, and relatively new to Linux. I'm currently trying to setup the python wrapper to run a PT-104 device on Debian 12. Upon trying to run the example provided on the github -- https://github.com/picotech/picosdk-pyt ... me-ov-file -- I've been getting the following error:

Code: Select all

Traceback (most recent call last):
  File "/home/anh41/Desktop/virt-env/lib/python3.11/site-packages/picosdk-python-wrappers-master/pt104Examples/pt104Example.py", line 8, in 
    from picosdk.usbPT104 import usbPt104 as pt104
  File "/home/anh41/Desktop/virt-env/lib/python3.11/site-packages/picosdk/usbPT104.py", line 19, in 
    usbPt104 = usbPT104lib()
               ^^^^^^^^^^^^^
  File "/home/anh41/Desktop/virt-env/lib/python3.11/site-packages/picosdk/usbPT104.py", line 16, in __init__
    super(usbPT104lib, self).__init__("usbPt104")
  File "/home/anh41/Desktop/virt-env/lib/python3.11/site-packages/picosdk/library.py", line 49, in __init__
    self._clib = self._load()
                 ^^^^^^^^^^^^
  File "/home/anh41/Desktop/virt-env/lib/python3.11/site-packages/picosdk/library.py", line 73, in _load
    raise CannotFindPicoSDKError("PicoSDK (%s) not found, check %s" % (self.name, env_var_name))
picosdk.errors.CannotFindPicoSDKError: PicoSDK (usbPt104) not found, check LD_LIBRARY_PATH
I've followed the installation instruction for picoscope as well as the specific driver for PT-104 that's available here: https://www.picotech.com/downloads/linux. When completing this step, I've tried it as written as well as with an alternative key for debian described here: viewtopic.php?t=12745

I've tried installing the python wrapper both with and without a virtual environment, using

Code: Select all

pip install .
within the virtual environment and

Code: Select all

python3 setup.py install
outside of it. I've also tried renaming the .so and moving them into picosdk as suggested here: viewtopic.php?t=40002

I've also messed around with changing the PYTHONPATH to several locations including:
OPT/picoscope/lib
virt-env/lib/python3.11/site-packages/picosdk (I also tried this same method outside of the virt-env)

At this point, I'm really looking for any advice on how to resolve this error. I have run out of ideas for how to approach this problem with the little background I have.

Thank you so much!
Post Reply