setup.py failing!

Forum for discussing PicoScope version 6 (non-automotive version)
Post Reply
royhersh
Newbie
Posts: 0
Joined: Tue Nov 13, 2018 5:40 pm

setup.py failing!

Post by royhersh » Sun Nov 18, 2018 6:39 pm

hello,

I have picoscope 6404D, I am trying to write python code that will make sweep on sound range.
I found the git and this siggen.py file https://github.com/picotech/picosdk-pyt ... 0SigGen.py, however when we try to run it we fail.

I have picoscope gui and picoSDK 64bit from your download center, we have downloaded numpy and mathplot (maybe i misspelled this one).
after reinstalling the picosdk and moving the python files to some other directory.
I got new error message, when i try to run "python3 setup.py install".
This error is very odd since i did not install any 32 bit program.

Code: Select all

"C:\Users\user\AppData\Local\Programs\Python\Python35-32\python.exe" "C:/Users/user/Desktop/picosdk-python-wrappers-master/picosdk-python-wrappers-master/ps6000Examples/ps6000SigGen.py"
Traceback (most recent call last):
C:\Program Files\Pico Technology\SDK\lib\ps6000.dll 32
  File "C:\Users\user\Desktop\picosdk-python-wrappers-master\picosdk-python-wrappers-master\ps6000Examples\picosdk\library.py", line 124, in _load
    result = WinDLL(library_path)
  File "C:\Users\user\AppData\Local\Programs\Python\Python35-32\lib\ctypes\__init__.py", line 347, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:/Users/user/Desktop/picosdk-python-wrappers-master/picosdk-python-wrappers-master/ps6000Examples/ps6000SigGen.py", line 11, in 
    from picosdk.ps6000 import ps6000 as ps
  File "C:\Users\user\Desktop\picosdk-python-wrappers-master\picosdk-python-wrappers-master\ps6000Examples\picosdk\ps6000.py", line 19, in 
    ps6000 = Ps6000lib()
  File "C:\Users\user\Desktop\picosdk-python-wrappers-master\picosdk-python-wrappers-master\ps6000Examples\picosdk\ps6000.py", line 16, in __init__
    super(Ps6000lib, self).__init__("ps6000")
  File "C:\Users\user\Desktop\picosdk-python-wrappers-master\picosdk-python-wrappers-master\ps6000Examples\picosdk\library.py", line 97, in __init__
    self._clib = self._load()
  File "C:\Users\user\Desktop\picosdk-python-wrappers-master\picosdk-python-wrappers-master\ps6000Examples\picosdk\library.py", line 130, in _load
    raise CannotOpenPicoSDKError("PicoSDK (%s) not compatible (check 32 vs 64-bit): %s" % (self.name, e))
picosdk.library.CannotOpenPicoSDKError: PicoSDK (ps6000) not compatible (check 32 vs 64-bit): [WinError 193] %1 is not a valid Win32 application

Process finished with exit code 1
please help, we really need to run this python program!!

Hitesh
PICO STAFF
PICO STAFF
Posts: 2855
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: setup.py failing!

Post by Hitesh » Wed Nov 21, 2018 9:51 am

Hi Roy,

Please check the order of the program directories in your Windows PATH environment variable. It might be picking up the PicoScope 6 directory first if you have installed that.

Try placing the C:\Program Files\Pico Technology\SDK\lib entry at the beginning of the PATH environment variable.

Hope this helps,
Hitesh

Software Dev. Engineer

Post Reply