I am running windows 64 bit with python 64 bit and am not able to import the SDK library into python and it's probably because the command line keeps throwing me an error that I have to install SDK even though I did several times. What is going on here? See screen cap when I try to install the setup. When I type "python install setup.py" like in the install instructions, it throws an error that the file cannot be found. Can we please have more detailed instructions as to how to get this working? Thanks
To investigate the phenomenon, I ran setup.py in debug mode, tracked the find_library method and in debug mode it works, it finds ps2000.dll in its lib folder.
However, when I run it regularly as stated above, I receive the above error.
I second this, we need better documentation on install for windows.
I followed the instruction for the install of the picoSDK and downloaded the python binding library for my 64 bit windows system.
Even after installing and re-installing the picoSDK multiple times I still get the following error when running >python setup.py install.
Please install the PicoSDK in order to use this wrapper.Visit https://www.picotech.com/downloads.
Can you give more info about exactly which try...except section you uncommented to get it to run? threes quite a few in the file.
Are you sure you saw quite a few? Perhaps we're looking at different versions, but this is the newest version of setup.py file, use this one (with commented part as my edit):
. I had only installed the SDK for the 5000 series because that's the only one I need and so the 2000 series libraries didn't exist, which is why the setup kept saying I needed to install the SDK.
And restarting your computer may be required for Windows if the SDK lib directory was added to the system PATH variable when the SDK was installed.
I got the same problem when I was trying to install the python wrapper.
I found out that it was related to the fact that I have the PicoSDK and the PicoScope 6 application installed.
I made the setup.py print out the exception that was thrown:
[WinError 193] %1 is not a valid Win32 application
Thus, I thought it had something to do with the common 64 vs 32 bit problem. However after ensuring that everything I've installed was 64-bit I started to look for other alternatives.
In the end I figured that I might as well print the found library
That's when I realised that the found .dll was not the one located within the SDK, but the one inside the Picoscope application. So I manullay set the library,
lib = r'C:\Program Files\Pico Technology\SDK\lib\ps2000.dll'
result = ctypes.WinDLL(lib)
And then I could finally install the wrapper with the setup.py script.
My next problem is that the Library class in the wrapper uses the ctypes.util.find_library( ) to identify the .dlls. So even though I could install it, I can still not use it without making changes to the wrapper code itself. Does anyone know how to circumvent this problem?
Are you saying the 'ps2000.dll' is not the same version, or not the same one?
Perhaps you can look in the Path environment variable and change the order of the paths looked at, so the SDK will get a priority over the Picoscope directory.