picosdk-python-wrappers: can't run any of the examples - ERROR: Cannot load library picoipp.dll

Post general discussions on using our drivers to write your own software here
Post Reply
Kuela
Newbie
Posts: 0
Joined: Wed Aug 31, 2022 12:34 pm

picosdk-python-wrappers: can't run any of the examples - ERROR: Cannot load library picoipp.dll

Post by Kuela »

Hi,
I cloned the picosdk-python-wrappers and followed the installation instructions.
PicoSDK (64-bit) - installed
setup picosdk python module - successful


My system:
Windows 10 enterprise, 64-bit operating system
Python3.9.13 64-bit - preinstalled

I tryed multiple examples (e.g. block.py from the folder anyScopeExamples) from picosdk-python-wrappers without success. I often get the error messages: ERROR: Cannot load library picoipp.dll followed by a bunch of problems. For example:
ERROR: Cannot load library picoipp.dll
ERROR: Cannot load library picoipp.dll
ERROR: Cannot load library picoipp.dll
ERROR: Cannot load library picoipp.dll
Traceback (most recent call last):
File "c:\Users\User1\Desktop\test_dev_python\block.py", line 9, in
with find_unit() as device:
File "C:\Users\User1\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\picosdk\discover.py", line 34, in find_unit
device = driver.open_unit()
File "C:\Users\User1\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\picosdk\library.py", line 134, in open_unit
return Device(self, self._python_open_unit(serial=serial, resolution=resolution))
File "C:\Users\User1\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\picosdk\library.py", line 146, in _python_open_unit
handle, status = self._python_open_any_unit(resolution)
File "C:\Users\User1\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\picosdk\library.py", line 163, in _python_open_any_unit
resolution = self.DEFAULT_RESOLUTION
AttributeError: 'Ps6000alib' object has no attribute 'DEFAULT_RESOLUTION'


I tryed it with/without installed PicoScope 6 and connected PicoScope 5444D MSO.

Is the problem known or can someone help? Thanks a lot in advance...

Kuela
Newbie
Posts: 0
Joined: Wed Aug 31, 2022 12:34 pm

Re: picosdk-python-wrappers: can't run any of the examples - ERROR: Cannot load library picoipp.dll

Post by Kuela »

I can finde two picoipp.dll on my system:

Code: Select all

Directory from C:\Program Files\Pico Technology\SDK\lib
22.02.2022  09:17        20.222.272 picoipp.dll
               1 File(s),     20.222.272 Bytes
Directory from C:\Program Files (x86)\Pico Technology\PicoScope6
21.10.2021  07:48        15.391.040 PicoIpp.dll
               1 File(s),     15.391.040 Bytes
How can I check the dll files and the paths?

shaider
Newbie
Posts: 0
Joined: Fri Jun 02, 2023 3:18 pm

Re: picosdk-python-wrappers: can't run any of the examples - ERROR: Cannot load library picoipp.dll

Post by shaider »

I am getting the same issue with Python 3.10 and 3.11.3, did you find a solution to this? Oddly Python 3.9 is working fine for me.

ZukBoi
Newbie
Posts: 0
Joined: Mon Jul 10, 2023 9:30 am

Re: picosdk-python-wrappers: can't run any of the examples - ERROR: Cannot load library picoipp.dll

Post by ZukBoi »

Same issue here, same PicoScope 5444D MSO. Tried adding all necessary files to path, tried with Python 3.7, 3.9, 3.11 just in case. Every time I somehow get past an error I get another, but the picoipp.dll error is persistent.

My PicoScope 7 software manages to connect, but obviously nothing helpful there in terms of how to run it in Python. Really wish Picotech used SCPI protocol. Much simpler.

shaider
Newbie
Posts: 0
Joined: Fri Jun 02, 2023 3:18 pm

Re: picosdk-python-wrappers: can't run any of the examples - ERROR: Cannot load library picoipp.dll

Post by shaider »

If anyone is interested, I managed to resolve this problem. I was previously using Python installations from the Microsoft app store (which caused this error). Only my Python 3.9 executable was from an Anaconda installation (which worked correctly with picosdk).

To resolve the issue properly I installed https://github.com/pyenv-win/pyenv-win pyenv for Windows and then used it to install Python 3.9.13. Once I did this I could install and use picosdk without any issue.

From a quick comparison of the picosdk package between the working and broken installations it looks like when using the Python executable from the official Microsoft store some DLL files are missing. Could be due to permission issues or the like, not really sure.

P.S. I am also using https://python-poetry.org/docs/ poetry as the package manager for my project, so I had to run the following commands to point poetry to the Python 3.9.13 executable installed by pyenv:

Code: Select all

$ pyenv local 3.9.13

$ pyenv which python
PATH_TO_PYTHON_EXE\python.exe

$ poetry env use PATH_TO_PYTHON_EXE\python.exe

$ poetry install


Post Reply