Python Driver Bindings Issue

Post any questions you may have about our current range of oscilloscopes
Post Reply
megahertz
Newbie
Posts: 0
Joined: Wed Jan 23, 2019 9:19 pm

Python Driver Bindings Issue

Post by megahertz » Wed Jan 23, 2019 9:45 pm

Hello,

OS: Windows 10
Language: Python 3.7 64-bit
IDE: Spyder
Product: PicoScope 2204A

I downloaded the picosdk-python-wrappers GitHub repository into the folder that contains my python distribution. I also downloaded the 64-bit PicoSDK C Libraries to the same folder.
According to the README.md file, I need to run the command

Code: Select all

python setup.py install
When I do this, I get the error

Code: Select all

Traceback (most recent call last):
  File "setup.py", line 26, in 
    result = ctypes.WinDLL(find_library(name))
  File "D:\Users\megahertz\Anaconda\lib\ctypes\__init__.py", line 356, in __init__
    self._handle = _dlopen(self._name, mode)
TypeError: LoadLibrary() argument 1 must be str, not None
What should I be doing differently so that setup.py runs correctly?

In another effort, I tried running both https://github.com/picotech/picosdk-pyt ... Example.py and https://github.com/picotech/picosdk-pyt ... Example.py at the advice of this thread topic39518.html?&p=140895&hilit=python#p140895. Python gives the error

Code: Select all

ModuleNotFoundError: No module named 'picosdk'
Is this error a result of the first issue? Or are there more things wrong with what I am doing?

strangequark
User
User
Posts: 2
Joined: Tue Mar 05, 2019 2:48 pm

Re: Python Driver Bindings Issue

Post by strangequark » Fri May 03, 2019 2:34 pm

Hi, I had the same problem. I solved it by copying the SDK folder over to my user folder. My user folder is used to store everything I create or every library I run on jupyter notebook. I am not sure which interface you're using whether it's straight up python, jupyter, spyder or whatever, but the program needs to be able to read the library file. So, whatever library you need to run in python, copy the SDK folder to the appropriate directory for python to read it. I didn't need to run the 'python install setup.py' once I copied that file over. These instructions are not clear and I am hoping they will make them better in the future.

Post Reply