Scroll Hat Mini Won't Install Under Trixie Lite 32-bit

I’m really starting to dislike Trixie…!

On a Pi Zero W with a brand new fresh install of Trixie Lite 32-bit, the install for a Scroll Hat Mini is failing on me (either the bash script or the pip install).

It installs the main package itself, but when it tries to install the back end dependencies it sits there for a while and then errors out complaining that it’s out of space on the device during cmake.

The card is a 32GB one, and the install is fresh out of the box (other than an initial update/upgrade).

The full install attempt and error is on this pastebin dump , along with a df -h showing that there’s plenty of space.

As this nice little hat is still for sale on the shop, one would hope it can still be used!

In the meantime, back to Bullseye I go (again).

I had a similar issue, and ended up doing a git clone.
St7789, Python, Legacy OS, can’t get it to work? - Support - Pimoroni Buccaneers

git clone https://github.com/pimoroni/st7789-python
cd st7789-python
./install.sh

Having a look see, I don’t think thats an option for you?
You’ll likely have to setup a virtual enviromnt and install into that, via the manual methode?
@hel may be able to help?

That’s basically what I did - you can see the virtual environment set-up in the first couple of lines on the paste.

I also tried removing the managed environment (by moving out the EXTERNALLY-MANAGED flag file in /usr/lib/python3.13) and it didn’t make any difference.

I can try cloning the GH repo, but I don’t think it will help here as the issue seems to be in the dependencies (cmake I think) rather than the Piomoroni package itself.

Looks like we still need to do some work on this old installer to get it working nicely with recent Pi OS but I managed to get it going like so:

Create virtual environment:
python3 -m venv --system-site-packages $HOME/.virtualenvs/pimoroni

Activate virtual environment:
source ~/.virtualenvs/pimoroni/bin/activate

Install via pip:
pip install scrollphathd

Possible you might need to enable I2C manually and, if you’re using Lite, install some other dependencies - I didn’t on the full version though.

Oh, apologies - just read your paste and saw that you were installing from pip.

I think if you set up your venv with the --system-site-packages flag it will use the installed system versions of the prerequisite packages, and hopefully avoid trying to build them all from scratch.

On Trixie Lite 32-bit and a Pi Zero W it’s still failing, even when using your commands and the venv.

Failure is building cmake, and if I try and install that directly via pip it’s failing that way with errors captured here - CMake pip install fail.

Can you try it on a Zero W with Trixie Lite 32-bit and see if your experience matches mine?

Pip will try to build the package from scratch if it does not find a pre-built package. On a Pi-Zero-W this is very slow and you can run out of memory or disk space. In your specific case it is /tmp that is low on space. Maybe there is a way to convince cmake to use a different directory. Try export TMP=/path/to/a/different/directory. Make sure you have read-write access there.

One other workaround is that you do this on a bigger Pi and copy the complete venv back to your Pi-Zero-W. It is probably a good idea to use a Pi with the same base architecture as the Zero-W.

You could also look to see if cmake (and any other problematic packages) are available to install through apt instead of pip. Alternatively the full version of Pi OS might be an easier ride, as more things are built in?

@hel is right, ignore my comment regarding the temp-dir. Pip is really trying to build cmake. I would start by installing cmake using normal apt. But be aware that pip is building cmake because it needs cmake to build something else. So this might end up in a longer journey.

There is a meta-package (I think it is build-essentials) which will pull in all the stuff that you normally need to build things. cmake is afaik not part of the essentials, but it is not a huge package.

Yeah, the lady earned her pay (and my thanks) today - the suggestion was spot-on.

Installed numpy, patchelf (what cmake is building I think) and cmake via apt, then it all worked fine and installed in about 3 seconds (rather than trying to build for over an hour then throwing a tantrum).

Thanks all for the support and suggestions. Now to carry on with the actual rebuild itself.

1 Like