I’m trying to read the data received via USB in Python (Linux). I’m new to Python.
I found PyUSB, but I don’t know how to use it. I have some issues with something called libusb.
I tried this code:
import usb
import usb.backend.libusb1 as libusb1
backend = libusb1.get_backend(find_library=lambda _: "LibUSB/MS64/dll/libusb-1.0.dll")
dev = usb.core.find(backend=backend)
print(dev)
But I have the following error:
Traceback (most recent call last):
File "C:\_Disco_Local\Python\_proyectos\_pruebaUSB_2\prueba1.py", line 1, in <module>
import usb
ModuleNotFoundError: No module named 'usb'
‘import usb’ is the import module for PyUSB, to install it run
pip install pyusb
in your terminal, which will install it onto your python library. it should be able to run after that