From e0c1e3d55c52ff6f2e7b76fe1d772427a7531d49 Mon Sep 17 00:00:00 2001 From: Tobias Frost Date: Tue, 21 Jun 2022 16:53:50 +0200 Subject: [PATCH] Simplify Debian/Ubuntu section. Debian packages should be preferred, or using a venv to avoid messing up users python environment. --- README.md | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 602d1e6..686ed52 100644 --- a/README.md +++ b/README.md @@ -35,13 +35,29 @@ access to the badge via USB. ### Required dependencies on Debian/Ubuntu Systems - sudo pip install pyhidapi - sudo pip install pillow - sudo apt-get install libhidapi-hidraw0 - sudo ln -s /usr/lib/x86_64-linux-gnu/libhidapi-hidraw.so.0 /usr/local/lib/ - or +#### Using Debian/Ubuntu packages (recommended): + sudo apt install python3-usb python3-pil +#### manually using a python virtual environment + +Using a venv will allow to use pip to install dependencies without the danger +that the instaled modules will interfere with the system installed ones. + + sudo apt install python3-venv + python3 -m venv ledtag + source ledtag/bin/activate + pip install pyhidapi pyusb pillow + # this should now work: + # python3 led-badge-11x44.py -m 6 -s 8 "Hello" "World!" + +if the udev rules are installed, you should be able to access the badge without sudo / root privileges. + +To reuse the venv again at a later point: + + source ledtag/bin/activate + python3 led-badge-11x44.py … + ### Required dependencies on Fedora Systems sudo dnf install hidapi python3-hidapi python3-pillow python3-pyusb