Skip to content

Commit

Permalink
doc: RPi Install Update
Browse files Browse the repository at this point in the history
This commit significantly enhances the setup instructions specifically
for Raspberry Pi users in the README.md file. The updates aim to provide
clearer, more detailed, and step-by-step guidance for setting up the
project on Raspberry Pi environments, especially addressing issues
related to dependencies and configurations.

Key Changes:

1. **Added Pre-requisites Section**: Introduced a new section detailing
   the pre-requisites for setting up the project on Raspberry Pi. This
   includes using Raspberry Pi OS Bullseye for better compatibility and
   the necessary library installations for `opencv-python`.

2. **Updated Repository Prioritization**: Instructions have been
   provided to modify `pyproject.toml` to prioritize the piwheels
   repository over PyPI for more reliable and faster package
   installations specific to the Raspberry Pi.

3. **Cleaner Documentation Structure**: Organized the Raspberry Pi
   section into a more readable and step-by-step format, making it
   easier for users to follow and apply the instructions.

This update to the README.md ensures that users attempting to set up the
project on Raspberry Pi have all the necessary information at their
disposal, reducing setup issues and enhancing the overall user
experience on such devices.
  • Loading branch information
Mr. ChatGPT committed Dec 30, 2023
1 parent c29bf75 commit 0e22c64
Showing 1 changed file with 53 additions and 8 deletions.
61 changes: 53 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,62 @@ The ability to develop, test and debug the launcher and facial recognition funct
```

1. Raspberry Pi:
Most likely you will run into `KeyRing` errors when installing over ssh on raspberry pi.

To get around it:
1. Pre-requisites:
For faster and reliable install, use [Raspberry Pi OS Bullseye](https://downloads.raspberrypi.com/raspios_oldstable_armhf/images/raspios_oldstable_armhf-2023-12-06/2023-12-05-raspios-bullseye-armhf.img.xz).
Binary wheels packages are available for `opencv-python` only for Bullseye currently. See [pi wheels/opencv-python wheel](https://www.piwheels.org/project/opencv-python/)
Install the pre-requisites:

```shell
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
poetry install
```
```shell
sudo apt install -y libatlas-base-dev libhdf5-dev libopenblas-dev
```

should work. See [GitHub issue](https://github.com/python-poetry/poetry/issues/1917) for further details.
1. Fix pyproject.toml manually:

Change the primary repo from `PyPI` to `piwheels`:

From:

```toml
[[tool.poetry.source]]
name = "piwheels.org"
url = "https://www.piwheels.org/simple"
priority = "supplemental"
[[tool.poetry.source]]
name = "PyPI"
priority = "primary"
```

To:

```toml
[[tool.poetry.source]]
name = "piwheels.org"
url = "https://www.piwheels.org/simple"
priority = "primary"
[[tool.poetry.source]]
name = "PyPI"
priority = "supplemental"
```

Delete the poetry.lock file

```shell
rm poetry.lock
```

1. Most likely you will run into `KeyRing` errors when installing over ssh on raspberry pi.

To get around it:

```shell
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
poetry install
```

should work. See [GitHub issue](https://github.com/python-poetry/poetry/issues/1917) for further details.

1. Windows:
Most likely you will run into `No backend available` errors.
Expand Down Expand Up @@ -92,7 +138,6 @@ To use `main.py`:
This script will utilize the camera to detect and track faces, and control the T-Shirt launcher based on the tracked positions.
### Headless Mode Operation
#### Overview
Expand Down

0 comments on commit 0e22c64

Please sign in to comment.