PicoSDK for Mac

Discussion forum for the Picoscope 6 Mac software
Post Reply
davidfokkema
Newbie
Posts: 0
Joined: Mon Apr 26, 2021 7:32 pm

PicoSDK for Mac

Post by davidfokkema »

Hi all,

I have been using picoscopes for a few years now and was using drivers I retrieved from the PicoScope 6 application following the instructions from some forum post with some additional library relinking to fix errors with matplotlib. Not fun, but I got it to work with the python wrappers in a conda environment. Since this is not a very portable solution I was hoping for something better to be released sometime in the then-future.

I was quite happy to see that a few months ago PicoSDK for Mac was released! I just installed it and created a clean conda environment in which I installed the newest python wrappers. However:

Code: Select all

>>> from picosdk.discover import find_all_units
Traceback (most recent call last):
  File "", line 1, in 
    from picosdk.discover import find_all_units
  File "/Users/david/anaconda3/envs/testpicosdk/lib/python3.9/site-packages/picosdk/discover.py", line 5, in 
    from picosdk.ps2000 import ps2000
  File "/Users/david/anaconda3/envs/testpicosdk/lib/python3.9/site-packages/picosdk/ps2000.py", line 20, in 
    ps2000 = Ps2000lib()
  File "/Users/david/anaconda3/envs/testpicosdk/lib/python3.9/site-packages/picosdk/ps2000.py", line 17, in __init__
    super(Ps2000lib, self).__init__("ps2000")
  File "/Users/david/anaconda3/envs/testpicosdk/lib/python3.9/site-packages/picosdk/library.py", line 49, in __init__
    self._clib = self._load()
  File "/Users/david/anaconda3/envs/testpicosdk/lib/python3.9/site-packages/picosdk/library.py", line 71, in _load
    raise CannotFindPicoSDKError("PicoSDK (%s) not found, check %s" % (self.name, env_var_name))
CannotFindPicoSDKError: PicoSDK (ps2000) not found, check LD_LIBRARY_PATH
This location: https://github.com/picotech/picosdk-python-wrappers still references the old forum post for MacOS users and does not reference the PicoSDK for Mac. I couldn't find any documentation regarding this new release. Clearly I'm missing something 😅.

Question: how am I supposed to use the PicoSDK for Mac using Python? Thanks!

Best regards,
David

grubi
Newbie
Posts: 0
Joined: Tue May 03, 2016 8:58 am

Re: PicoSDK for Mac

Post by grubi »

Vote +1
I'm also very interested on that!
Posted something similar in:
viewtopic.php?p=145337#p145337

but also didn't get an answer so far.

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

Re: PicoSDK for Mac

Post by AndrewA »

FYI-
The current version of the SDK package (PicoSDK-10.7.21.211.pkg) does not contain any shared libraries (DYLIB) apart from a few (pl1000, picoipp).
I have checked the previous version has all the DYLIB files and uploaded to this our gdrive-
PicoSDK-10.7.19.191.pkg- https://drive.google.com/open?id=10eG5X ... p=drive_fs
Regards Andrew
Technical Specialist

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

Re: PicoSDK for Mac

Post by AndrewA »

FYI-
Mac SDK package has now updated and fixed, now has all the drivers and shared library files version- 10.7.21
https://www.picotech.com/downloads/_lightbox/macos-sdk
Regards Andrew
Technical Specialist

jtmbeta
Newbie
Posts: 0
Joined: Wed Apr 22, 2020 9:25 am

Re: PicoSDK for Mac

Post by jtmbeta »

Hello,

I installed the PicoSDK for mac but would now like to uninstall it. How do I do this?

Thanks,
Joel

davidfokkema
Newbie
Posts: 0
Joined: Mon Apr 26, 2021 7:32 pm

Re: PicoSDK for Mac

Post by davidfokkema »

Hi Joel,

This is probably no longer relevant, but the SDK is installed in /Library/Frameworks/PicoSDK.framework. You can safely remove that directory and its contents. Do NOT remove anything other in /Library/Frameworks.

Best,
David

davidfokkema
Newbie
Posts: 0
Joined: Mon Apr 26, 2021 7:32 pm

Re: PicoSDK for Mac

Post by davidfokkema »

Hi AndrewA,

Thanks, I'm using the SDK now. I do have a question, though. When distributing my application, should I include the PicoTech libraries? Am I allowed to do that? Or should I tell people to install my application and additionally install the PicoSDK for Mac? If the latter: the picosdk-python-wrappers do not pick up the drivers on Mac. I have to copy the libraries into my project OR set a very long environment variable pointing to several PicoSDK subdirectories:

Code: Select all

$ export DYLD_LIBRARY_PATH=/Library/Frameworks/PicoSDK.framework/Libraries/libpicoipp/:/Library/Frameworks/PicoSDK.framework/Libraries/libps5000a
(if you're ONLY using a 5000-series picoscope).

It proved to be fairly trivial to add Mac-support to picosdk-python-wrappers to locate the libraries inside the framework without setting any environment variables, but not all library dependencies seem to be properly exposed on MacOS. With otool you can supposedly see all dependencies, but there is an additional dependency on the picoipp library. Because it is not properly exposed or linked, or something like that, you really need the DYLD_LIBRARY_PATH variable set.

I see three courses of action:
  1. Include PicoTech libraries in my application installer.
  2. Ask my users to install the SDK and set an environment variable.
  3. Fix the PicoSDK library dependency links and update the picosdk-python-wrappers to properly locate the libraries.
I can do 1) or 2) and can submit a PR for the python part of 3). For the library part of 3), we need the PicoTech support team, ;-). Thanks for your guidance!

Best,
David

apk
Newbie
Posts: 0
Joined: Tue Nov 15, 2022 8:27 am

Re: PicoSDK for Mac

Post by apk »

I have the same issue as this post. Did you find a fix for this ?
davidfokkema wrote:
Mon Apr 26, 2021 7:41 pm

Code: Select all

>>> from picosdk.discover import find_all_units
Traceback (most recent call last):
  File "", line 1, in 
    from picosdk.discover import find_all_units
  File "/Users/david/anaconda3/envs/testpicosdk/lib/python3.9/site-packages/picosdk/discover.py", line 5, in 
    from picosdk.ps2000 import ps2000
  File "/Users/david/anaconda3/envs/testpicosdk/lib/python3.9/site-packages/picosdk/ps2000.py", line 20, in 
    ps2000 = Ps2000lib()
  File "/Users/david/anaconda3/envs/testpicosdk/lib/python3.9/site-packages/picosdk/ps2000.py", line 17, in __init__
    super(Ps2000lib, self).__init__("ps2000")
  File "/Users/david/anaconda3/envs/testpicosdk/lib/python3.9/site-packages/picosdk/library.py", line 49, in __init__
    self._clib = self._load()
  File "/Users/david/anaconda3/envs/testpicosdk/lib/python3.9/site-packages/picosdk/library.py", line 71, in _load
    raise CannotFindPicoSDKError("PicoSDK (%s) not found, check %s" % (self.name, env_var_name))
CannotFindPicoSDKError: PicoSDK (ps2000) not found, check LD_LIBRARY_PATH
This location: https://github.com/picotech/picosdk-python-wrappers still references the old forum post for MacOS users and does not reference the PicoSDK for Mac. I couldn't find any documentation regarding this new release. Clearly I'm missing something 😅.

davidfokkema
Newbie
Posts: 0
Joined: Mon Apr 26, 2021 7:32 pm

Re: PicoSDK for Mac

Post by davidfokkema »

No, I did not yet find a fix or get a response from PicoTech. I develop my application on my Mac (and use the environment-variable approach) but deploy it on Windows, where users 'just' have to install the drivers for Windows.

Post Reply