cython-hidapi icon indicating copy to clipboard operation
cython-hidapi copied to clipboard

Build from PyPi fails because of missing 'hid.c'

Open jbaiter opened this issue 12 years ago • 2 comments

When I try to install hidapi from PyPi using pip, the compilation fails because it cannot find hid.c:

$ pip install hidapi                                                                                                                                                      
Downloading/unpacking hidapi
  Downloading hidapi-0.7.0-1.tar.gz
  Running setup.py egg_info for package hidapi

Installing collected packages: hidapi
  Running setup.py install for hidapi
    building 'hid' extension
    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -I/usr/include/libusb-1.0 -fPIC -I/usr/include/python2.7 -c hid.c -o build/temp.linux-x86_64-2
.7/hid.o
    gcc-4.7.real: error: hid.c: No such file or directory
    gcc-4.7.real: fatal error: no input files
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 4

jbaiter avatar Aug 23 '13 15:08 jbaiter

I also ran in to this issue, on Mac OS X (10.9.5). This occurred when using the PyPi package through pip, as well as when trying to build from source (using trezor's branch). I was able to resolve it by upgrading setuptools, like so:

[sudo] pip install setuptools --upgrade

spacenate avatar Jan 05 '16 21:01 spacenate

Thank you spacenate. Upgrading setuptools also resolved this issue for me.

basnappl avatar Jan 06 '19 20:01 basnappl