Cannot Find PicoSDK Error on macOS M1 - Check LD_LIBRARY_PATH

Post your Python discussions here.
Post Reply
KurtAD
Newbie
Posts: 0
Joined: Sun May 26, 2024 5:23 am

Cannot Find PicoSDK Error on macOS M1 - Check LD_LIBRARY_PATH

Post by KurtAD »

Dear PicoScope Support Team,

I hope this message finds you well.

I am currently experiencing difficulties with integrating my PicoScope 5442D (without MISO) with Python using the PicoSDK on my MacBook M1. Despite following the installation instructions and setting the LD_LIBRARY_PATH to the directory containing the libps5000a.dylib file, I continue to encounter the following error when attempting to import the picosdk.ps5000a library in Spyder (Anaconda):

Code: Select all

File /opt/anaconda3/lib/python3.11/site-packages/spyder_kernels/py3compat.py:356 in compat_exec
    exec(code, globals, locals)
File ~/Desktop/Pico/01_Git/Python/ps5000aExamples/ps5000aBlockAdvancedTriggerExample.py:10
    from picosdk.ps5000a import ps5000a as ps
File /opt/anaconda3/lib/python3.11/site-packages/picosdk/ps5000a.py:21
    ps5000a = Ps5000alib()
File /opt/anaconda3/lib/python3.11/site-packages/picosdk/ps5000a.py:18 in __init__
    super(Ps5000alib, self).__init__("ps5000a")
File /opt/anaconda3/lib/python3.11/site-packages/picosdk/library.py:49 in __init__
    self._clib = self._load()
File /opt/anaconda3/lib/python3.11/site-packages/picosdk/library.py:71 in _load
    raise CannotFindPicoSDKError("PicoSDK (%s) not found, check %s" % (self.name, env_var_name))
CannotFindPicoSDKError: PicoSDK (ps5000a) not found, check LD_LIBRARY_PATH
Here are the details of my current setup:
- PicoSDK installed in: /Library/Frameworks/PicoSDK.framework/Libraries/libps5000a/libps5000a.2.dylib
- LD_LIBRARY_PATH set to: /Library/Frameworks/PicoSDK.framework/Libraries/libps5000a
- Running on: MacBook M1

I have verified the path and confirmed the presence of libps5000a.dylib in the specified directory. Below is the relevant code snippet and the method I used to set the LD_LIBRARY_PATH (bash):

Code: Select all

export LD_LIBRARY_PATH=/Library/Frameworks/PicoSDK.framework/Libraries/libps5000a
Despite these configurations, the error persists. Could you please provide guidance on how to resolve this issue? Any assistance or troubleshooting steps would be greatly appreciated.

Thank you very much for your support.

Best regards,
Kurt

eklektek
User
User
Posts: 2
Joined: Wed Sep 21, 2022 3:56 pm

Re: Cannot Find PicoSDK Error on macOS M1 - Check LD_LIBRARY_PATH

Post by eklektek »

Hi Kurt, did you get a fix for this issue?
I appear to be hitting the same!!

Best..

KurtAD
Newbie
Posts: 0
Joined: Sun May 26, 2024 5:23 am

Re: Cannot Find PicoSDK Error on macOS M1 - Check LD_LIBRARY_PATH

Post by KurtAD »

Hey eklektek,

Unfortunately, I haven’t resolved the issue yet. When I manage to fix it, I’ll be happy to post the solution here.

AndrewA
PICO STAFF
PICO STAFF
Posts: 420
Joined: Tue Oct 21, 2014 3:07 pm

Re: Cannot Find PicoSDK Error on macOS M1 - Check LD_LIBRARY_PATH

Post by AndrewA »

Hi,

Try-

Code: Select all

PYTHONPATH=/Library/Frameworks/PicoSDK.framework/Libraries/ LD_LIBRARY_PATH=/Library/Frameworks/PicoSDK.framework/Libraries/ python3 ~/Desktop/Pico/01_Git/Python/ps5000aExamples/ps5000aBlockAdvancedTriggerExample.py
As per this post-
topic42654.html?&p=150155&hilit=API+VNA#p150155
Regards Andrew
Technical Specialist

Post Reply