pylibftdi, libusb-1.0.dll, windows 7 - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: pylibftdi, libusb-1.0.dll, windows 7 (/thread-4865.html) |
pylibftdi, libusb-1.0.dll, windows 7 - tigner - Sep-11-2017 Hi , This works on *nix,and works on *some* windows 7 machines... Microsoft Windows [Version 6.1.7601] Copyright © 2009 Microsoft Corporation. All rights reserved. C:\Users\MSU>python Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit ( Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> ^Z C:\Users\MSU>cd mypython C:\Users\MSU\MyPython>python Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit ( Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import pylibftdi >>> from pylibftdi import BitBangDevice >>> bb = BitBangDevice() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Python27\lib\site-packages\pylibftdi\bitbang.py", line 60, in __init_ _ self.open() File "C:\Python27\lib\site-packages\pylibftdi\bitbang.py", line 66, in open super(BitBangDevice, self).open() File "C:\Python27\lib\site-packages\pylibftdi\device.py", line 163, in open self.driver._libusb.libusb_set_auto_detach_kernel_driver(dev, 1) File "C:\Python27\lib\ctypes\__init__.py", line 375, in __getattr__ func = self.__getitem__(name) File "C:\Python27\lib\ctypes\__init__.py", line 380, in __getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: function 'libusb_set_auto_detach_kernel_driver' not found >>> The directory contains and needed .dll files, and this code should work everytime. On some win7 machines it works, others just give errors. I have installed the same version of Python2.7 everytime. I use Zadig to change the 232hm ftdi device driver to the recommended libusbk version. This is weird, on some Win7 machines it works, on others it has the above error. All installations are identical win7 64bit installs with sp1 installed. Any help is greatly appreciated. Thank you, tigner |