Quote:
Originally Posted by Alexander Turcic
I have the same problem when trying to install PyUSB from source (python setup.py install) on Ubuntu edge. Xenophon, you said you edited the setup script to make it work?
|
Yes, but my fix may not be relevant to you. The error happens because usb.h is not being found on your include path (or perhaps it is, but not the
right usb.h. On Mac OS X you might have installed libusb in either of two ways; setup.py as written supported only one of them.
More specifically... The easy way to install libusb is via the 'fink' utility (an opensource package manager for OS X). fink installs all its packages in the /sw/... tree, and that's where the current setup.py expects to find usb.h. Sadly, the version of libusb that is needed for prs500 has not yet been ported to OS X by the fink folks. So I fell back to the slightly more complicated installation method, to wit: download and install libusb from the original developers web site (out on SourceForge). That installation drops the package into the /usr/local/... tree. The only change I made to setup.py was to add /usr/local/include and /usr/local/lib in the obvious places (alongside the pre-existing /sw/include and /sw/lib that were already there).
My fix is potentially relevant to other OS X users. I will matter for you (on Ubuntu) only if you have an existing libusb install that is both (a) the version needed for prs500 and (b) installed somewhere other than the place that setup.py expects.
Xenophon