user@hostname:~$ sudo -H pip install trezor
Collecting trezor
Requirement already satisfied: ecdsa>=0.9 in /usr/local/lib/python2.7/dist-packages (from trezor)
Requirement already satisfied: setuptools>=19.0 in /usr/lib/python2.7/dist-packages (from trezor)
Collecting hidapi>=0.7.99 (from trezor)
Using cached hidapi-0.7.99.post20.tar.gz
Requirement already satisfied: protobuf>=2.6.1 in /usr/local/lib/python2.7/dist-packages (from trezor)
Requirement already satisfied: mnemonic>=0.8 in /usr/local/lib/python2.7/dist-packages (from trezor)
Requirement already satisfied: six>=1.9 in /usr/local/lib/python2.7/dist-packages (from protobuf>=2.6.1->trezor)
Requirement already satisfied: pbkdf2 in /usr/local/lib/python2.7/dist-packages (from mnemonic>=0.8->trezor)
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-Uj9H6u/hidapi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpNHBN82pip-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:1633: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 <anonymous> *}’ 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
----------------------------------------
Failed building wheel for hidapi
Running setup.py clean for hidapi
Failed to build hidapi
Installing collected packages: hidapi, trezor
Running setup.py install for hidapi ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-Uj9H6u/hidapi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-FQaHAF-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
skipping 'hid.c' Cython extension (up-to-date)
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:1633: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 <anonymous> *}’ 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
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-Uj9H6u/hidapi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-FQaHAF-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-Uj9H6u/hidapi/
user@hostname:~$