My first attempt pip install btchip-python failed and error message suggested I lack libusb package. I fixed this by doing pip install libusb, yet btchip-python installation was still failing, this time with:
....
hidapi/libusb/hid.c:47:20: fatal error: libusb.h: No such file or directory
I installed missling dev package:
but it did not help much, and it was still failing the same way. It appears that on Ubuntu/Debian you need to install libusb-1.0.0-dev instead of libusb-dev:
apt install libusb-1.0.0-dev
This solved my problem, but instead it started failing
....
/usr/bin/ld: cannot find -ludev
which I solved with
This time all worked fine
$ pip install btchip-python
Collecting btchip-python
Collecting hidapi>=0.7.99 (from btchip-python)
Using cached hidapi-0.7.99.post21.tar.gz
Collecting setuptools>=19.0 (from hidapi>=0.7.99->btchip-python)
Using cached setuptools-36.6.0-py2.py3-none-any.whl
Building wheels for collected packages: hidapi
Running setup.py bdist_wheel for hidapi ... done
Stored in directory: /<PATH>/.cache/pip/wheels/90/ea/5c/9827ea51c117f43a0df937f29d02630ecf0bdbc3e5b2fa2bba
Successfully built hidapi
Installing collected packages: setuptools, hidapi, btchip-python
Successfully installed btchip-python-0.1.21 hidapi-0.7.99.post21 setuptools-36.6.0
If you do not have to install it via PIP, then
apt install python-btchip
would be much less painful.
Hope this helps.