Closed jonnojohnson closed 9 years ago
Thanks for testing this. It would be great if you help me to debug this. A few questions
Version: 0.1.dev0
ASRL INSTR: Available via PySerial (14.1.0)
TCPIP INSTR: Available
USB INSTR: Available via PyUSB (1.0.0rc1). Backend: libusb0
I only have the one Win7 machine right now. I did test in both 32 & 64 bit python installs with the same results. I get no errors importing serial or usb.
In [4]: usb.version_info
Out[4]: (1, 0, 0, 'b2')
Not sure what else to try with serial or usb.
can you also post the output of:
import serial
ver = serial.version
I think that there are three issues here: 1.- The PySerial version is not reported (this is PyVISA-py responsibility) 2.- PyUSB does not have a backend. (this is PyUSB responsability and might be related to a lack of libusb or similar in your system. See https://github.com/walac/pyusb/issues/26) 3.- PyVISA-py still tries to use USB even if PyUSB has no backend (this is PyVISA-py responsibility)
I will fix 3, it would be great if you can look at 2.
And if you can help to understand 1.
In [5]: serial.version
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-5-bc4648fda10c> in <module>()
----> 1 serial.version
AttributeError: 'module' object has no attribute 'version'
I have libusb1 installed, version 1.3.0
Just realized this:
In [9]: serial.VERSION
Out[9]: '2.7'
ie; VERSION must be uppercase.
In my computer
>>> import serial
>>> serial.version
['14', '1', '0']
>>> serial.VERSION
'2.7'
Looking at the PySerial code, I think it is quite messy how the version is handled due to 2to3 usage.
Regarding PyUSB (point 2), I am convinced that the problem is not in PyVISA but in your PyUSB installation or in PyUSB. I would suggest that you try to make the find
command work as described here: https://github.com/walac/pyusb/blob/master/docs/tutorial.rst
I think my usb problem is the install (or lack of) libusb1.0. I had installed libusb1 using pip but hadn't realized it's just a wrapper for libusb1 and doesn't get me the dll. It looks like installing libusb1 itself is a royal pain on Windows that I don't have time to mess with right now.
Then I will close this issue and open others por the pending stuff.