pyusb: setup on a Windows machine

...using a binary module

  1. install libusb-win32
  2. install the Python Windows installer from http://www.python.org/download/
  3. install the PyUSB Windows installer from http://sourceforge.net/projects/pyusb/ (Make sure the Python versions match for the two installers. pyusb-0.4.1.win32-py2.5.exe, for instance, works with python-2.5.2.msi)
  4. test it by running usbenum.py or accessing help for the usb module:
    C:\Python25>python
    [...]
    >>> help('usb')
    Help on module usb:
    
    NAME
        usb - USB access module
    [...]
    

...compiling from scratch (with Visual Studio)

  1. download python-2.4
    1. install it to C:\Python24\
  2. download libusb-win32
    1. unzip it to C:\Temp\libusb-win32\
    2. install the filter
  3. download pyusb
    1. unzip it to C:\Temp\pyusb\
  4. install Visual Studio .Net 2005
  5. open the pyusb.vcproj
    1. Switch to Release: Build→Configuration Manager→Configuration→Release
    2. Add Include Directories: pyusb→Properties→C/C++→General→Additional Include Directories: C:\Python24\include;C:\Temp\libusb\include
    3. Add Additional Library Directories: pyusb→Properties→Linker→General→Additional Library Directories: C:\Python24\libs;C:\temp\libusb\lib\msvc
  6. Build the project: pyusb→Build
  7. copy C:\temp\pyusb\Release\usb.pyd to C:\Python24\Lib\site-packages\usb.pyd
  8. test it
 
wiki/projects/python/pyusb/setup/win32.txt · Last modified: 2008/08/28 16:35 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki