Python Library – PyUSB

pyusb logoWebsite / GitHub

Informatie (ENG):

PyUSB aims to be an easy to use Python module to access USB devices. PyUSB relies on a native system library for USB access. Currently, it works out of the box with libusb 0.1, libusb 1.0,libusbx, libusb-win32 and OpenUSB, and works with any Python version starting at 2.4, including Python 3 releases.

Installatie

Installeer PyUSB met het commando: sudo pip install pyusb


Foutmelding: insufficient permissions

Krijg je deze foutmelding:
usb.core.USBError: [Errno 13] Access denied (insufficient permissions)

Dan ben je wellicht het SUDO commando vergeten er voor te zetten ;-)

Is dit niet het geval dan kan je proberen om het apparaat toegang te geven (udev) als “non-root” gebruiker:

SUBSYSTEM=="usb", ATTR{idVendor}=="0fcf", ATTR{idProduct}=="1008", MODE="666"

Voor oudere versies van udev:

SUBSYSTEM=="usb", SYSFS{idVendor}=="0fcf", SYSFS{idProduct}=="1008", MODE="666"


Foutmelding: NotImplementedError: is_kernel_driver_active

Krijg je deze foutmelding:
NotImplementedError: is_kernel_driver_active

Op sommige linux systemen geeft versie 1.0.0b2 wat problemen, verwijder de installatie met het commando: sudo pip uninstall -y pyusb

En installeer de 1.0.0b1 versie met het commando: sudo pip install pyusb==1.0.0b1