-
Couldn't load subscription status.
- Fork 56
"pip install btchip-python" does not work, runs into error #23
Description
Here is what I get when trying to install it:
pip install btchip-python
Collecting btchip-python
Collecting hidapi>=0.7.99 (from btchip-python)
Using cached hidapi-0.7.99.post20.tar.gz
Collecting setuptools>=19.0 (from hidapi>=0.7.99->btchip-python)
Using cached setuptools-36.2.7-py2.py3-none-any.whl
Building wheels for collected packages: hidapi
Running setup.py bdist_wheel for hidapi ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-mXtvEp/hidapi/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" bdist_wheel -d /tmp/tmp7zOcANpip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_ext
cythoning hid.pyx to hid.c
building 'hid' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/hidapi
creating build/temp.linux-x86_64-2.7/hidapi/libusb
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Ihidapi/hidapi -I/usr/include/libusb-1.0 -I/usr/include/python2.7 -c hid.c -o build/temp.linux-x86_64-2.7/hid.o
hid.c: In function ‘__pyx_pf_3hid_6device_open’:
hid.c:1720:45: warning: passing argument 1 of ‘PyUnicodeUCS4_AsWideChar’ from incompatible pointer type [-Wincompatible-pointer-types]
__pyx_v_result = PyUnicode_AsWideChar(__pyx_v_serial_number, __pyx_v_cserial_number, __pyx_v_serial_len);
^
In file included from /usr/include/python2.7/Python.h:85:0,
from hid.c:4:
/usr/include/python2.7/unicodeobject.h:246:31: note: expected ‘PyUnicodeObject * {aka struct *}’ but argument is of type ‘PyObject * {aka struct _object *}’
define PyUnicode_AsWideChar PyUnicodeUCS4_AsWideChar
^
/usr/include/python2.7/unicodeobject.h:591:24: note: in expansion of macro ‘PyUnicode_AsWideChar’
PyAPI_FUNC(Py_ssize_t) PyUnicode_AsWideChar(
^
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Ihidapi/hidapi -I/usr/include/libusb-1.0 -I/usr/include/python2.7 -c hidapi/libusb/hid.c -o build/temp.linux-x86_64-2.7/hidapi/libusb/hid.o
hidapi/libusb/hid.c:47:20: fatal error: libusb.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
I tried to install with sudo apt-get install python-btchip but this only installs an older version which misses the attribute enableAlternate2fa which is needed by the referencing software!