Unicorn HAT HD - Bookworm Challenges

I upgraded one of my pi hosts from bullseye to bookworm, and unfortunately, my Unicorn HAT HD is no longer working. I attempted to reinstall, but there appear to be some errors. The full output of that reinstall is below. Does anyone have any ideas to assist me in getting this functional again? Thanks!

$curl https://get.pimoroni.com/unicornhathd | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 35095  100 35095    0     0  39624      0 --:--:-- --:--:-- --:--:-- 39610

This script will install everything needed to use
Unicorn HAT HD

Always be careful when running scripts and commands copied
from the internet. Ensure they are from a trusted source.

This script should -- only be run on a Raspberry Pi with RPi OS --
other systems and SBCs are not supported and may explode!

If you want to see what this script does before running it,
you should run: 'curl https://get.pimoroni.com/unicornhathd'

Note: Unicorn HAT HD requires SPI communication

Do you wish to continue? [y/N] y

Checking environment...
Updating apt indexes...

Checking hardware requirements...

SPI already enabled

Checking packages required by SPI interface...
......package python3-spidev can't be found, fetching from alternative location...
Selecting previously unselected package python3-spidev:armhf.
(Reading database ... 100503 files and directories currently installed.)
Preparing to unpack .../python3-spidev_2.0~git20150907_armhf.deb ...
Unpacking python3-spidev:armhf (2.0~git20150907) ...
dpkg: dependency problems prevent configuration of python3-spidev:armhf:
 python3-spidev:armhf depends on python3 (<< 3.5).
 python3-spidev:armhf depends on python3 (>= 3.4~).
 python3-spidev:armhf depends on libc6 (>= 2.4).

dpkg: error processing package python3-spidev:armhf (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
spidev installed and up-to-date

Unicorn HAT HD comes with examples and documentation that you may wish to install.
Performing a full install will ensure those resources are installed,
along with all required dependencies. It may however take a while!

Do you wish to perform a full install? [y/N] y

Checking for dependencies...
fonts-freefont-ttf is already installed

Installing python3-unicornhathd...
Apt failed to install python3-unicornhathd!
Falling back on pypi...

Installing Unicorn HAT HD library for Python 3...

error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to

    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.

    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.

    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
Python 3 library install failed!
If problems persist, visit forums.pimoroni.com for support

Try the manual install, and see what happens.

There we go. That helped. I had to pursue some unorthodox methods to make things work again, but the manual install helped! Thanks!

Good to hear you got it working. Might want to post an issue on Github
Issues · pimoroni/unicorn-hat-hd (github.com)
Or contact Pimoroni Tech Support.
Contact Us for Raspberry Pi Technical Support - Pimoroni
They may be able to fix it and make it easier for the next guy.

Indeed! I posted the issue and how I resolved it here:

1 Like

Nice, thanks for taking the time to do that.