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: 425
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
jrp
Newbie
Posts: 0
Joined: Thu Jul 25, 2024 7:42 pm

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

Post by jrp »

Hi Andrew,

I tried your suggestion and it didn't work for me (Apple M3 Max silicon, Mac OS: Sonoma 14.5). I still get the following error: "picosdk.errors.CannotFindPicoSDKError: PicoSDK (ps5000a) not found, check LD_LIBRARY_PATH".

Is it possible to provide the library path directly via the API somehow?

Thank-you!
cloudzhueng
Newbie
Posts: 0
Joined: Sat Aug 03, 2024 12:00 pm

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

Post by cloudzhueng »

I have encountered the same problem, which is quite troubling. The oscilloscope I am using is the 3000E. I am not clear on how to set the path.
Post Reply