Cannot run sample files from picosdk-python-wrappers repository

Having problems ? let us know the details here
Post Reply
msiddiq7
Newbie
Posts: 1
Joined: Thu Jul 16, 2020 10:20 pm

Cannot run sample files from picosdk-python-wrappers repository

Post by msiddiq7 »

I have installed picosdk and the required libraries to run the example code posted at:
https://github.com/picotech/picosdk-python-wrappers

But for some reason, I get this error (see attached) and have no idea what the issue is.

Error:
Traceback (most recent call last):
File "ps2000BlockExample.py", line 10, in
from picosdk.ps2000 import ps2000 as ps
File "/Users/mustafasiddiqui/.local/share/virtualenvs/weld-monitor-izOhh0DV/lib/python3.7/site-packages/picosdk/ps2000.py", line 20, in
ps2000 = Ps2000lib()
File "/Users/mustafasiddiqui/.local/share/virtualenvs/weld-monitor-izOhh0DV/lib/python3.7/site-packages/picosdk/ps2000.py", line 17, in __init__
super(Ps2000lib, self).__init__("ps2000")
File "/Users/mustafasiddiqui/.local/share/virtualenvs/weld-monitor-izOhh0DV/lib/python3.7/site-packages/picosdk/library.py", line 49, in __init__
self._clib = self._load()
File "/Users/mustafasiddiqui/.local/share/virtualenvs/weld-monitor-izOhh0DV/lib/python3.7/site-packages/picosdk/library.py", line 71, in _load
raise CannotFindPicoSDKError("PicoSDK (%s) not found, check %s" % (self.name, env_var_name))
picosdk.errors.CannotFindPicoSDKError: PicoSDK (ps2000) not found, check LD_LIBRARY_PATH
Attachments
error.png

NeilH
PICO STAFF
PICO STAFF
Posts: 267
Joined: Tue Jul 18, 2017 8:28 am

Re: Cannot run sample files from picosdk-python-wrappers repository

Post by NeilH »

Have you followed the setup steps in the README file?

Have you got the same bit version of the PicoSDK as your installed python?
Neil
Technical Support Engineer

pestopoppa
Newbie
Posts: 1
Joined: Wed Mar 30, 2022 9:53 am

Re: Cannot run sample files from picosdk-python-wrappers repository

Post by pestopoppa »

I have done all these things. I'm on a Lenovo IdeaPad 5 (Windows operating system) attempting to operate a PicoScope 9402-05. I installed the 64-bit software found here:

https://www.picotech.com/downloads/_lig ... cosample-4

The "python setup.py install" command didn't work (posting error below) but still managed to run "import picosdk" from inside the cloned github folder. I figured I was just dealing with an environment variable issue so I modified my PYTHONPATH system variable to include the "C:\Users\(myUser)\picosdk-python-wrappers" directory.

I can now import picosdk in my terminal freely but when I try to run:
"from picosdk.discover import find_all_units"

I get the above error also. I'm out of ideas. Could someone please help? WHat am I doing wrong?

P.S. WHen I do try running "python setup.py install" I get the following error

Traceback (most recent call last):
File "setup.py", line 19, in
result = ctypes.WinDLL(find_library(name))
File "C:\Python27\Lib\ctypes\__init__.py", line 362, in __init__
self._handle = _dlopen(self._name, mode)
TypeError: LoadLibrary() argument 1 must be string, not None

afan
Newbie
Posts: 1
Joined: Tue Jul 04, 2023 6:05 am

Re: Cannot run sample files from picosdk-python-wrappers repository

Post by afan »

same error here:

Traceback (most recent call last):
File "", line 1, in
File "C:\Users\afan\AppData\Local\Temp\pip-req-build-q28adgs1\setup.py", line 19, in
result = ctypes.WinDLL(find_library(name))
File "C:\Users\afan\Miniconda3\envs\bat\lib\ctypes\__init__.py", line 364, in __init__
self._handle = _dlopen(self._name, mode)
TypeError: LoadLibrary() argument 1 must be str, not None

can anyone help pls ?

Post Reply