Blinkt Installation fails on RPiOS Bullseye

I burned a new copy of RPiOS 64 bit lite (the latest release, Bullseye) and ran sudo apt update && sudo apt full-upgrade. This is on a Raspberry Pi Zero 2.

After that run the Pimoroni install script curl https://get.pimoroni.com/blinkt | bash
It seems to go OK until “Do you want to perform a full install?” when I get this error:

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

Checking for dependencies...

Installing python3-blinkt...
install ok installed

Installing Blinkt! 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
    install.

    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.

    For more information visit http://rptl.io/venv

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

I think python3-blinkt is successfully installed, it fails at some later stage?
There is a directory ~/Pimoroni/blinkt but it is empty.

How to do a full installation with examples on Buster?

I commented out the exit 1 on line 839 of the install script, it now runs to completion and at least one example works. No idea if the installation is fully OK though.

image

Not too impressed by the “Support” shipmates.

A collection of things here… first off, the “latest release” is Bookworm, not Bullseye, so double check what you think you’ve installed.

Second up, the “externally managed Python” message indicates you’re actually on Bookworm and not Bullseye - this came with a major change to the way Python is managed, and is discussed extensively on just about every active thread here right now - the TL:DR version is that the lowest friction solution is to use the “Legacy” version of the OS, which avoids the managed Python mess.

(Thirdly, why do you imagine that the library is “successfully installed”, when literally the last message in your copy is “library install failed”? And why bring up Buster?!)

The forum is first point of contact.
If that doesn’t get results you have the following option.

Contact Us for Raspberry Pi Technical Support - Pimoroni

Pi OS 12, Debian version: 12 (bookworm) is the one that now requires the virtual environment install.
I have a Blinkt on a Pi 4B running Legacy. Install went fine with no issues, near as I can remember anyway. Memory isn’t what it used to be these days. :(

You are right, it’s Bookworm, as you successfully divined. At first I just typed “the latest release” but considered that insufficiently clear and (wrongly) added the version name which came to mind. I am sorry to mislead you.

Before posting I searched for blinkt installation failed and found nothing (of course it’s possible I included the word Bullseye)

I’m speechless.
It doesn’t prominently say that in the online documentation for the product, nor does the installation script check the OS version and warn that things won’t go well.

At some point I ran sudo apt install python3-blinkt and got
python3-blinkt is already the newest version (0.1.2).

To an extent, I agree - it would generate a lot fewer of these threads if there was a general “if you’re trying to use Bookworm, read here” type post pinned.

However, in defence of the installation script; Bookworm didn’t exist when it was written, and I’m not sure many people outside of the Raspberry Pi core team really saw the whole “let’s break the Python ecosystem” coming…

It’s a work in progress and hasn’t been merged in yet, but there’s a version of the Blinkt! install script here that’s been updated for Bookworm if you want to give it a go:

I’m sure @gadgetoid would appreciate feedback on the PR if you encounter any issues.

I know it is very frustrating when there are radical changes included with a Linux release. (Windows too)

Note that the Blinkt, although quite an old product, is still actively marketed. Moreover, the installation script has been written as far as possible to be non-specific to the product. The install script for the UnicornHat HD is very similar.

It’s getting on for two months now since RPiOS Bookworm was released.
At some point in that period you would think that somebody aboard the good ship Pimoroni has installed some of their products on Bookworm, yet neither the documentation nor the script[s] appear to have been updated to address the installation problems.
This is, to say the least, shoddy.

Thank you for that @hel.
I do not have the first idea how to use that info to test the revised install script.
But a little feedback for @gadgetoid, the page says

Blinkt! For Pi 5 😆

I am using a Pi Zero 2, the problem is very far from being limited to the Pi 5

First you’ll need to create a venv:

I don’t know what a venv is, though I can guess it means virtual environment, presumably it is an alternative installation to freeze a potentially out of date library.
I certainly do not want one of those. Nor, as it turns out, do I need anything of the sort because the Blinkt is now working with my code after removing one line of the script and apt installing one library.

Info on the virtual environment is here.
Raspberry Pi Documentation - Raspberry Pi OS
I was pointed to it in this thread.
St7789 install error with Bookworm? - Support - Pimoroni Buccaneers

It’s also linked to in the error message you get in Bookworm these days (including the error message linked in the OP)

[and with that, I’m bowing out!]

Could you tell me what file that would be?
And its location?
Please, and thank you.