On Mon, Jan 21, 2019 at 5:28 AM charles wilson wrote:
> On permissions, I had checked/changed permissions previously but re-checked 
> and found a missed one in /python3.5/site-packages/usb/backend- happened to 
> be libusb1.pywhich was flagged - all fixed now

> I had also not checked the /dev/*USB* but did and gave necessary permissions

> drwxrwxrwx 3 pi pi  4096 Jan 20 13:31 backend
> -rwxrwxrwx 1 pi pi  8739 Jan 20 13:31 control.py
> still get the same error diagnostic which still ends usb.core.USBError: 
> [Errno 13] Access denied (insufficient permissions)"

> so basically no change.

Charles,

The permission issue is with the USB device node under
/dev/bus/usb/*/* and not the python library files. It looks like you
have messed up all library files permissions now - they need not and
should not be writeable for everybody. You'd better reinstall the
packages to tidy up.

>
> Now the interesting bit. I tried running as root
> root@raspi3:/home/pi/PyProj# python3.5 pyusb_1.py
> Traceback (most recent call last):
>   File "pyusb_1.py", line 2, in <module>
>     import usb.core
> ImportError: No module named 'usb'
>
> same result if I simply sudo python3.5 pyusb_1.py
>
> when I run python3.5 from the terminal and get the python >>> prompt there is 
> no trouble with 'import' and checking with 'help(usb)' shows the module is 
> there and accessible.
>
> Interesting though is that I have the same problem on all linux, so whatever 
> I did wrong I did it each time. I have tried installing pyusb with PIP and 
> sudo apt-get but it makes no difference.

Note that your Raspberry Pi has both python 2 and python 3 installed.
The Debian package "python-usb" is for Python 2 and the package
"python3-usb" is for Python 3.

Regards,
Tormod


_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to