Skip to content

Instantly share code, notes, and snippets.

@sourcesimian
Created January 16, 2018 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sourcesimian/08db32f7e690de6df47b4d5854af5f63 to your computer and use it in GitHub Desktop.
Save sourcesimian/08db32f7e690de6df47b4d5854af5f63 to your computer and use it in GitHub Desktop.
Installing Python trezor API on Ubuntu Linux (17.10)

Installing Python Trezor API on Ubuntu Linux (17.10)

This proved to be quite tricky. I did so for Python 2 and Python 3. Here are my notes:

Setup for Chrome:

$ cat /etc/udev/rules.d/51-trezor.rules

SUBSYSTEM=="usb", ATTR{idVendor}=="534c", ATTR{idProduct}=="0001", MODE="0666", GROUP="dialout", SYMLINK+="trezor%n"
KERNEL=="hidraw*", ATTRS{idVendor}=="534c", ATTRS{idProduct}=="0001",  MODE="0666", GROUP="dialout"

(ref: https://doc.satoshilabs.com/trezor-user/settingupchromeonlinux.html#manual-configuration-of-udev-rules)

All:

sudo apt-get install -y build-essential libusb-1.0-0-dev libusb-dev

Python 2:

  • sudo apt-get install -y python-dev virtualenv
  • virtualenv --no-setuptools --no-wheel --no-pip --no-site-packages
  • . ./virtualenv/bin/activate
  • wget https://bootstrap.pypa.io/get-pip.py
  • python ./getpip.py
  • pip install Cython
  • pip instal trezor

Python 3:

  • sudo apt-get install -y python3-dev python-venv
  • python3 -m venv virtualenv
  • . ./virtualenv/bin/activate
  • pip install wheel
  • pip install --upgrade setuptools
  • pip install hidapi
  • pip install trezor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment