analogdevicesinc / libsmu

Software abstractions for the analog signal exploration tools.
http://analogdevicesinc.github.io/libsmu/
BSD 3-Clause "New" or "Revised" License
32 stars 31 forks source link

installing libsmu for Python 3.7 on Windows #128

Closed damercer closed 5 years ago

damercer commented 5 years ago

Hi:

I want to start seeing if I can make the transition from using Python 2.7 to Python 3.

I'm trying to install and use libsmu/pysmu for Python 3.7 on Windows. The installer only has check boxes for 3.4 and 3.5. I clicked on the spot to select where the target Python is located on the local disk and changed it to where 3.7 was installed. After the installer finished I looked in the Lib/site-packages under 3.7 and there was a pysmu directory there. But...

From the 3.7 python shell if I try to import pysmu it returns with an error:

Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license()" for more information.

from pysmu import Traceback (most recent call last): File "<pyshell#0>", line 1, in from pysmu import File "C:\Python37\lib\site-packages\pysmu__init__.py", line 6, in from .libsmu import * ImportError: DLL load failed: The specified module could not be found.

BTW. Before I did any of this I removed all the old libsmu/pysmu versions using the control panel. So there should be a clean install just for this 3.7.

Something does not seem to be pointing to the right place to find the libsmu DLL? I checked here: C:\Program Files\Analog Devices\libsmu to make sure that stuff for libsmu was there. The smu command line program seems to function and returns the version 1.0.1-g2eb5bfd which is the latest version that contains my extensions from earlier in the year.

Thanks

Doug

Thanks

Doug

damercer commented 5 years ago

I have some further details on attempting to make progress on this issue: I removed the (AMD)64 bit version of Python 3.7 and used the default Windows installer for Python 3.7.4 which is 32 bit. I then used pip to install numpy and that worked fine. I then used the same libsmu revision (for X86) installer as above and changed the Python directory to C:\Python37.

Now when I attempt to run my program it finds numpy (as expected) and the import of pysmu does not return an error but trying to start a session does:

Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 19:29:22) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license()" for more information.

================= RESTART: C:\ALICEm2k\alice-desktop-1.3.pyw ================= No Init File Read Traceback (most recent call last): File "C:\ALICEm2k\alice-desktop-1.3.pyw", line 18507, in ConnectDevice() File "C:\ALICEm2k\alice-desktop-1.3.pyw", line 16827, in ConnectDevice session = Session(ignore_dataflow=True, sample_rate=SAMPLErate, queue_size=MaxSamples) NameError: name 'Session' is not defined

So I still need some guidance from you on how to proceed.

Thanks

Doug

damercer commented 5 years ago

Latest build from 1.0.1212 seems to install and work (so far at least ) on Python 3.7. Still does not automatically find the installed Python37 on my system, not sure why. But loads fine if I manually tell it where Python37 is. Thanks Doug