wizio
December 21, 2022, 12:02pm
1
Hi there
Where to put libusb-1.0(.dll) to work?
wizio
December 21, 2022, 12:18pm
3
global for PlatformIO … I not use “tool” exe
With Python libraries using libusb I had good luck putting the libusb dll in the same folder as the python interpeter executing PlatformIO. So, ~/.platformio/penv/bin/
.
wizio
December 21, 2022, 12:31pm
5
.platformio/penv/bin/libusb-1.0.dll
not working
And that is the folder where the used Python executable is per pio system info
output?
opened 02:07PM - 20 Feb 18 UTC
closed 02:59PM - 20 Feb 18 UTC
Using 0.9.0 on Windows yields this error:
```python-traceback
bauerj@DESKTO… P-5KP26RC ~ python
Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:14:34) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from trezorlib.device import TrezorDevice
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "c:\python3.6.2\lib\site-packages\trezorlib\device.py", line 23, in <module>
from .transport_webusb import WebUsbTransport
File "c:\python3.6.2\lib\site-packages\trezorlib\transport_webusb.py", line 24, in <module>
import usb1
File "c:\python3.6.2\lib\site-packages\usb1\__init__.py", line 61, in <module>
from . import libusb1
File "c:\python3.6.2\lib\site-packages\usb1\libusb1.py", line 199, in <module>
libusb = _loadLibrary()
File "c:\python3.6.2\lib\site-packages\usb1\libusb1.py", line 173, in _loadLibrary
return dll_loader('libusb-1.0' + suffix, **loader_kw)
File "c:\python3.6.2\lib\ctypes\__init__.py", line 348, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
```
opened 04:03PM - 08 May 15 UTC
closed 12:00PM - 09 May 15 UTC
I have some problem when I test this package on win64.
File "C:\Python27\lib\… site-packages\libusb1.py", line 195, in <module>
libusb = _loadLibrary()
File "C:\Python27\lib\site-packages\libusb1.py", line 166, in _loadLibrary
return dll_loader('libusb-1.0' + suffix, **loader_kw)
File "C:\Python27\lib\ctypes__init__.py", line 365, in **init**
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 126] The specified module could not be found
then I download the binary for windows from http://libusb.info/
but I have no idea which file I should use and where I could put the dll file.
Could anyone help me, please
wizio
December 21, 2022, 1:20pm
7
my mistake … I remove Python path from env[‘ENV’][‘PATH’]
DLL together with .platformio/penv/Scripts/python.exe … work
If you can add arbitrary paths to the PATH
, then the libusb dll can also be anywhere, not specifically in the interpreter folder.
wizio
December 21, 2022, 1:24pm
9
yep … later will add tool-folder with this libraries (win, lin, mac…)