2014-11-03 14:48 GMT-02:00 Anony Mous <fyng...@gmail.com>: >> If libusb(x) has been installed with Homebrew: > It hasn't. This is a fresh compile under 10.6.8. I am trying -- hard -- to > avoid using homebrew and similar. Last time I tried, which was not with > homebrew but macports, it wrecked my system by overwriting things I was > using with incompatible versions and required a format and reinstall of the > OS. > > It's a library. It should be reasonable to compile and install. I have done > this many other times with many other libraries and never run into a > problem. > > So that's where I am about homebrew. Nervous. Very nervous. > >> > Adding libusb path to DYLD_LIBRARY_PATH should be enough. > > in .bash-profile, I have these: > > > export DYLD_FALLBACK_LIBRARY_PATH=/usr/local/lib > export DYLD_LIBRARY_PATH=/usr/local/lib > export PYUSB_DEBUG_LEVEL=debug >
The of the environment variable change recently to PYUSB_DEBUG. > env returns (each cut from lots of results and pasted here): > > DYLD_FALLBACK_LIBRARY_PATH=/usr/local/lib > DYLD_LIBRARY_PATH=/usr/local/lib > PYUSB_DEBUG_LEVEL=debug > > The libraries are definitely in /usr/local/lib viz: > > bash-3.2$ ls -l /usr/local/lib/libusb* > -rwxr-xr-x 1 root wheel 81480 Oct 28 14:20 > /usr/local/lib/libusb-1.0.0.dylib > -rw-r--r-- 1 root wheel 245792 Oct 28 14:20 /usr/local/lib/libusb-1.0.a > lrwxr-xr-x 1 root wheel 18 Oct 28 14:20 > /usr/local/lib/libusb-1.0.dylib -> libusb-1.0.0.dylib > -rwxr-xr-x 1 root wheel 936 Oct 28 14:20 /usr/local/lib/libusb-1.0.la > > Here's my test code: > > ============= > > #!/usr/bin/python > > import usb.core > import usb.backend.libusb1 > > testmode = 1 > > if testmode == 0: > mybackend = usb.backend.libusb1.get_backend(find_library=lambda x: > "/usr/local/lib/libusb-1.0.0.dylib") > > if mybackend == None: > print "Failure to evaluate library name" > print "backend = "+str(mybackend) > else: > dev = usb.core.find(idVendor=0xfffe, idProduct=0x0001, backend=mybackend) > if dev is None: > raise ValueError('Our device is not connected') > elif testmode == 1: > dev = usb.core.find(idVendor=0xfffe, idProduct=0x0001) > if dev is None: > raise ValueError('Our device is not connected') > > In testmode 0: > > bash-3.2$ ./pm-ben.py > Failure to evaluate library name > backend = None > > In testmode 1: > > bash-3.2$ ./pm-ben.py > Traceback (most recent call last): > File "./pm-ben.py", line 19, in <module> > dev = usb.core.find(idVendor=0xfffe, idProduct=0x0001) > File "/Library/Python/2.6/site-packages/usb/core.py", line 1199, in find > raise ValueError('No backend available') > ValueError: No backend available > > ======== > > It doesn't appear that the DEBUG log command does anything, but this is > still just trying to get libusb to wake up, so I wouldn't expect it to. > > Anything in there that is helpful to anyone? > > --Ben > fyng...@gmail.com > > > ------------------------------------------------------------------------------ > > _______________________________________________ > pyusb-users mailing list > pyusb-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pyusb-users > -- Best Regards, Wander Lairson Costa ------------------------------------------------------------------------------ _______________________________________________ pyusb-users mailing list pyusb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyusb-users