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:
>>> 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!
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
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.
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:
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:
Include PicoTech libraries in my application installer.
Ask my users to install the SDK and set an environment variable.
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!
>>> 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 .
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.