Some documentation improvements regarding common installation hints.

pull/8/head
Ben Sartori 7 months ago
parent f43e76e612
commit d5d977bbdd
  1. 29
      README.md

@ -47,20 +47,23 @@ access to the badge via USB.
Using a venv will allow to use pip to install dependencies without the danger Using a venv will allow to use pip to install dependencies without the danger
that the installed modules will interfere with the system installed ones. that the installed modules will interfere with the system installed ones.
On some systems (esp. those with Python 2 *and* 3 installed), you have to
address Python 3 explicitly by using the commands `python3` / `pip3` instead
of `python` / `pip`.
sudo apt install python3-venv sudo apt install python3-venv
python3 -m venv ledtag python -m venv ledtag
source ledtag/bin/activate source ledtag/bin/activate
pip install pyhidapi pyusb pillow pip install pyhidapi pyusb pillow
# this should now work: # this should now work:
# python3 led-badge-11x44.py -m 6 -s 8 "Hello" "World!" # python 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. 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: To reuse the venv again at a later point:
source ledtag/bin/activate source ledtag/bin/activate
python3 led-badge-11x44.py … python led-badge-11x44.py …
### Required dependencies on Fedora Systems ### Required dependencies on Fedora Systems
@ -76,16 +79,15 @@ library to the needed place, e.g.
### Required dependencies on Mac Systems ### Required dependencies on Mac Systems
On some systems (esp. those with Python 2 *and* 3 installed), you have to
address Python 3 explicitly by using the command `pip3` instead of `pip`.
sudo easy_install pip sudo easy_install pip
pip install pyhidapi pip install pyhidapi
pip install pillow pip install pillow
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
brew install hidapi brew install hidapi
or Try with
pip3 install pyhidapi
### Required dependencies on Windows 7/10 ### Required dependencies on Windows 7/10
For Windows, we need to set up the libusb API for the LED badge device. For Windows, we need to set up the libusb API for the LED badge device.
@ -115,7 +117,9 @@ or specific versions from [here](https://www.python.org/downloads/windows/)
- `[x]` Add Python X.Y to PATH - `[x]` Add Python X.Y to PATH
- Click the `Install Now ...` text message. - Click the `Install Now ...` text message.
Install needed the Python packages. Install needed the Python packages. On some systems (esp. those with Python 2
*and* 3 installed), you have to address Python 3 explicitly by using the
command `pip3` instead of `pip`.
- Run cmd.exe as Administrator, enter: - Run cmd.exe as Administrator, enter:
@ -125,11 +129,12 @@ Install needed the Python packages.
#### Examples: #### Examples:
To run these examples on linux, you might have to prepend `sudo` for accessing To run these examples on linux, you might have to prepend `sudo` for accessing
the USB device. On Windows, maybe you have to run the `cmd`, where you enter the the USB device or install a udev rule as stated above. On Windows, maybe you
commands, with `Run as administrator`, which is similar to the `sudo`on linux. have to run the `cmd`, where you enter the commands, with `Run as administrator`,
which is similar to the `sudo`on linux.
On systems with Python 2 *and* 3 installed, you might want to use Python 3 On some systems (esp. those with Python 2 *and* 3 installed), you have to
explicitely by using `python3` instead of `python`. address Python 3 explicitly by using `python3` instead of `python`.
python ./led-badge-11x44.py "Hello World!" python ./led-badge-11x44.py "Hello World!"

Loading…
Cancel
Save