# Pirate Audio: Headphone Amp for Raspberry Pi --Display not working

**URL:** <https://forums.pimoroni.com/t/pirate-audio-headphone-amp-for-raspberry-pi-display-not-working/27073>\
**Category:** Support\
**Created:** [January 13, 2025, 3:29pm UTC](https://forums.pimoroni.com/t/pirate-audio-headphone-amp-for-raspberry-pi-display-not-working/27073 "2025-01-13T15:29:28Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![aHelp](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@aHelp](https://forums.pimoroni.com/u/aHelp)\
**Post date:** [January 13, 2025, 3:29pm UTC](https://forums.pimoroni.com/t/pirate-audio-headphone-amp-for-raspberry-pi-display-not-working/27073/1 "2025-01-13T15:29:28Z")

</div>

Hello,

I have had the Pirate Audio: Headphone Amp for Raspberry Pi around for a months but I have been unable to get the display to work. I am using a Pi zero w.

I was wondering if some one might have an updated set of step by step instructions I could follow or just a working image I can download. I am just trying to build a basic music player. I have no need for an internet connection on the device. I have been through the process several times with no luck, and the zero is painfully slow to update and all that. Mopidy seems to be installed correctly.

I updated my OS and then ran the following.

```auto
git clone https://github.com/pimoroni/pirate-audio
cd pirate-audio/mopidy
sudo ./install.sh

```

Thanks,

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [January 13, 2025, 7:25pm UTC](https://forums.pimoroni.com/t/pirate-audio-headphone-amp-for-raspberry-pi-display-not-working/27073/2 "2025-01-13T19:25:04Z")

</div>

Have you seen this?  
[Getting Started with Pirate Audio](https://learn.pimoroni.com/article/getting-started-with-pirate-audio)

---

<div class="post-metadata">

**Author:** ![aHelp](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@aHelp](https://forums.pimoroni.com/u/aHelp)\
**Post date:** [January 13, 2025, 7:56pm UTC](https://forums.pimoroni.com/t/pirate-audio-headphone-amp-for-raspberry-pi-display-not-working/27073/3 "2025-01-13T19:56:36Z")

</div>

Yep, those are the same directions I posted.

```auto
git clone https://github.com/pimoroni/pirate-audio
cd pirate-audio/mopidy
sudo ./install.sh

```

---

<div class="post-metadata">

**Author:** ![OverweightPrimate](https://avatars.discourse-cdn.com/v4/letter/o/d26b3c/32.png) [@OverweightPrimate](https://forums.pimoroni.com/u/OverweightPrimate)\
**Post date:** [January 13, 2025, 8:46pm UTC](https://forums.pimoroni.com/t/pirate-audio-headphone-amp-for-raspberry-pi-display-not-working/27073/4 "2025-01-13T20:46:23Z")

</div>

Same issue, came here to find more info. There does seem to be some issue with deprecated libraries, specifically an updated Python that breaks something in the code and some issues with mopidy.

I’ve looked at the [Github Issue page](https://github.com/pimoroni/pirate-audio/issues?q=is%3Aopen+is%3Aissue), and am planning on messing with some of that new info tonight. If anyone knows specifically how to work around all this, I’d love to know!

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [January 13, 2025, 9:21pm UTC](https://forums.pimoroni.com/t/pirate-audio-headphone-amp-for-raspberry-pi-display-not-working/27073/5 "2025-01-13T21:21:35Z")

</div>

I have a Pirate Audio Speaker. It’s currently running a very old version of Raspbian. It’s setup as an itty bitty beat box. In place of the speaker phat. Just FYI.  
[Build an Itty Bitty Beat Box](https://learn.pimoroni.com/article/build-an-itty-bitty-beat-box)  
I’m not currently using the Display portion. I have run some of the sp7789 examples on it.

Just to recap,  
display doesn’t work at all?  
or just issues with song playing, album art etc?

Here, [pimoroni/pirate-audio: Examples and documentation for the Pirate Audio range of Raspberry Pi add-ons](https://github.com/pimoroni/pirate-audio/tree/master)  
It says st7789 display (see [GitHub - pimoroni/st7789-python: Python library to control an ST7789 240x240 1.3" TFT LCD display.](https://github.com/pimoroni/st7789-python)

Which I believe is what I did way back when.

---

<div class="post-metadata">

**Author:** ![OverweightPrimate](https://avatars.discourse-cdn.com/v4/letter/o/d26b3c/32.png) [@OverweightPrimate](https://forums.pimoroni.com/u/OverweightPrimate)\
**Post date:** [January 13, 2025, 9:28pm UTC](https://forums.pimoroni.com/t/pirate-audio-headphone-amp-for-raspberry-pi-display-not-working/27073/6 "2025-01-13T21:28:25Z")

</div>

> [@alphanumeric](#):
>
> Just to recap,  
> display doesn’t work at all?  
> or just issues with song playing, album art etc?

Yep, it will not display anything. I may just need to mess with it more, but as of writing, it just doesn’t work. I’m planning on using this as a sort of portable MP3 with a battery pack, so the display is pretty crucial.

> [@alphanumeric](#):
>
> I have a Pirate Audio Speaker. It’s currently running a very old version of Raspbian.

I may just go back to some old version of Rasbian, but I just want something stable at the moment LOL

---

<div class="post-metadata">

**Author:** ![aHelp](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@aHelp](https://forums.pimoroni.com/u/aHelp)\
**Post date:** [January 13, 2025, 9:37pm UTC](https://forums.pimoroni.com/t/pirate-audio-headphone-amp-for-raspberry-pi-display-not-working/27073/7 "2025-01-13T21:37:51Z")

</div>

The back light is on, but nothing shows on the display. I believe the issue is with ST7789.

While troubleshooting I ran  
sudo pip3 install st7789

but I had to add something along the lines of --break-system-package (I don’t remember now) it seemed to run but I still never got anything on the display. I have since reinstalled.

When running :  
sudo apt-get install python-rpi.gpio python-spidev python-pip python-pil python-numpy  
You will get an error. It works when you change python to python3

and then  
sudo pip3 install st7789

but you will get the error externally-managed-invironment  
It will work with `--break-system-packages`  
I have not done that this time around though.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [January 13, 2025, 10:00pm UTC](https://forums.pimoroni.com/t/pirate-audio-headphone-amp-for-raspberry-pi-display-not-working/27073/8 "2025-01-13T22:00:04Z")

</div>

I had my fair share of issues trying to get an st7889 based LCD breakout working with Bookworm. The imposed Python Virtual Environment was a PITA.  
[St7789, Python, Legacy OS, can’t get it to work? - Support - Pimoroni Buccaneers](https://forums.pimoroni.com/t/st7789-python-legacy-os-cant-get-it-to-work/26923/7)

Currently most on my st7889 LCD’s are connected to Pico’s. When I get a chance I’ll connect a monitor and keyboard to my itty bitty beat box and fire it up. Then check what version of Raspbian its running, and see what history is there of what I did in the terminal window. I’m pretty sure I did some button test code?

I’ll post back what I find out tomorrow. I could even swap out my SD card for a spare Pi OS one. And start from a fresh install?

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [January 13, 2025, 10:03pm UTC](https://forums.pimoroni.com/t/pirate-audio-headphone-amp-for-raspberry-pi-display-not-working/27073/9 "2025-01-13T22:03:56Z")

</div>

This may get me some negative feedback, but I’m going to post it anyway.  
It’s one of those not recommended and do so at your own risk.  
Running the following from terminal will disable the virtual environment.  
`sudo rm -rf /usr/lib/python3.11/EXTERNALLY-MANAGED`

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [January 14, 2025, 1:22pm UTC](https://forums.pimoroni.com/t/pirate-audio-headphone-amp-for-raspberry-pi-display-not-working/27073/10 "2025-01-14T13:22:59Z")

</div>

Ok my setup is a Pi Zero W Rev 1.1, running Buster. And as near as I can tell I haven’t installed any st7789 software. So, that I have done, and I double checked that SPI is enabled.

```auto
>>> %Run scrolling-text.py
Traceback (most recent call last):
  File "/home/pi/scrolling-text.py", line 7, in <module>
    import st7789
ModuleNotFoundError: No module named 'st7789'

```

@hel@gadgetoid

---

<div class="post-metadata">

**Author:** ![pboddie](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@pboddie](https://forums.pimoroni.com/u/pboddie)\
**Post date:** [January 15, 2025, 12:31am UTC](https://forums.pimoroni.com/t/pirate-audio-headphone-amp-for-raspberry-pi-display-not-working/27073/11 "2025-01-15T00:31:11Z")

</div>

I have been using the Pirate Audio Speaker board with other single-board computers and not always with Linux, either. Although there may be support benefits in driving the ST7789 from Python, it is possible to use the ST7735 driver in Linux (drivers/gpu/drm/tiny/st7735r.c) with some specialisations to support the ST7789 and the screen on these boards as a normal framebuffer.

I guess that at some point I should share these specialisations so that this offers an alternative. As noted above, it is possibly easier to support the use of Python modules than Linux drivers, but there are definitely benefits in going down the Linux driver path.

---

<div class="post-metadata">

**Author:** ![aHelp](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@aHelp](https://forums.pimoroni.com/u/aHelp)\
**Post date:** [January 15, 2025, 2:37pm UTC](https://forums.pimoroni.com/t/pirate-audio-headphone-amp-for-raspberry-pi-display-not-working/27073/12 "2025-01-15T14:37:35Z")

</div>

> [@alphanumeric](#):
>
> sudo rm -rf /usr/lib/python3.11/EXTERNALLY-MANAGED

I tried this it did not fix the missing display.

---

<div class="post-metadata">

**Author:** ![aHelp](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@aHelp](https://forums.pimoroni.com/u/aHelp)\
**Post date:** [January 15, 2025, 2:39pm UTC](https://forums.pimoroni.com/t/pirate-audio-headphone-amp-for-raspberry-pi-display-not-working/27073/13 "2025-01-15T14:39:01Z")

</div>

I found an old copy of buster and gave it a shot. I ran the commands but I still have no display.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [January 15, 2025, 2:52pm UTC](https://forums.pimoroni.com/t/pirate-audio-headphone-amp-for-raspberry-pi-display-not-working/27073/14 "2025-01-15T14:52:45Z")

</div>

@hel posted this in my other thread.

I believe the most recent version of the st7789 installer installs into a virtual environment (if you don’t have one, it will set one up for you).

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

You’ll then need to switch to your virtual environment before running the examples with:

`source ~/.virtualenvs/pimoroni/bin/activate`

Looks like we could indeed do with updating the readme to be a bit more helpful here!

That worked on my Pi 400 running Bookworm. I’m getting a message about text size being depreciated, but I’m getting the scrolling text on a display when run from the virtual environment. It was a stock fresh install of Bookworm 64bit.

I’ll have to hunt up a spare SD card to try it on my Pi Zero Pirate Audio setup.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [January 16, 2025, 3:46pm UTC](https://forums.pimoroni.com/t/pirate-audio-headphone-amp-for-raspberry-pi-display-not-working/27073/15 "2025-01-16T15:46:15Z")

</div>

I won’t be able to test this out on my Pirate Audio Hat. I took my Pirate Audio Hat and plugged it onto a spare Pi 4B I had here. That 4B **was** working just fine with Pi OS already installed. I have no idea what happened but it wouldn’t boot up? The SD Card that was in it now shows as 0 Mb, and the Pi 4 won’t boot up at all, sd card in it or not. The hat is also dead now? No sound now when plugged into my itty bitty beat box. The hat was on properly, I double checked it before powering up the Pi. Just bad luck, I’m thinking the Pi died and in the process took everything else with it? I’ll have to go get my multi meter and check voltages etc.  
Anyway, I don’t have any other hats with an LCD on them here to tinker with. Not Pi based anyway.

---

<div class="post-metadata">

**Author:** ![aHelp](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@aHelp](https://forums.pimoroni.com/u/aHelp)\
**Post date:** [January 17, 2025, 12:51pm UTC](https://forums.pimoroni.com/t/pirate-audio-headphone-amp-for-raspberry-pi-display-not-working/27073/16 "2025-01-17T12:51:25Z")

</div>

I gave this a shot and still have no display.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [January 17, 2025, 1:26pm UTC](https://forums.pimoroni.com/t/pirate-audio-headphone-amp-for-raspberry-pi-display-not-working/27073/17 "2025-01-17T13:26:29Z")

</div>

@hel Hel Gibbons may be able to help you out? My current working test setup is a 1.54" SPI Colour Square LCD (240x240) Breakout connected to a Pi 400 running Bookworm. I’m hunting though my stuff for something closer to the Pirate Audio Hat. No luck so far.

---

<div class="post-metadata">

**Author:** ![hel](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/hel/32/6075_2.png) [@hel](https://forums.pimoroni.com/u/hel)\
**Post date:** [January 17, 2025, 1:55pm UTC](https://forums.pimoroni.com/t/pirate-audio-headphone-amp-for-raspberry-pi-display-not-working/27073/18 "2025-01-17T13:55:51Z")

</div>

@aHelp Do you get any errors if you try and run the [st7789 examples](https://github.com/pimoroni/st7789-python/tree/main/examples)?

I think you’ll need to edit the backlight line to point at the correct pin (13) if you’re using a Pirate Audio.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [January 22, 2025, 8:28pm UTC](https://forums.pimoroni.com/t/pirate-audio-headphone-amp-for-raspberry-pi-display-not-working/27073/19 "2025-01-22T20:28:00Z")

</div>

Not working for me on a Pi Zero W running latest 32 bit Bookworm.  
I did the

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

```

But trying to run the scrolling text example failed?

```auto
kyrie@raspberrypi:~ $ source ~/.virtualenvs/pimoroni/bin/activate
(pimoroni) kyrie@raspberrypi:~ $ cd st7789-python
(pimoroni) kyrie@raspberrypi:~/st7789-python $ cd examples
(pimoroni) kyrie@raspberrypi:~/st7789-python/examples $ ls
320x240.py deployrainbows.gif gif.py LICENSE.txt scrolling-text.py
cat.jpg framerate.py image.py round.py shapes.py
(pimoroni) kyrie@raspberrypi:~/st7789-python/examples $ python3 scrolling-text.py
Traceback (most recent call last):
  File "/home/kyrie/.virtualenvs/pimoroni/lib/python3.11/site-packages/numpy/_core/ __init__.py", line 23, in <module>
    from . import multiarray
  File "/home/kyrie/.virtualenvs/pimoroni/lib/python3.11/site-packages/numpy/_core/multiarray.py", line 10, in <module>
    from . import overrides
  File "/home/kyrie/.virtualenvs/pimoroni/lib/python3.11/site-packages/numpy/_core/overrides.py", line 7, in <module>
    from numpy._core._multiarray_umath import (
ImportError: libopenblas.so.0: cannot open shared object file: No such file or directory

```

---

<div class="post-metadata">

**Author:** ![hel](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/hel/32/6075_2.png) [@hel](https://forums.pimoroni.com/u/hel)\
**Post date:** [January 23, 2025, 9:31am UTC](https://forums.pimoroni.com/t/pirate-audio-headphone-amp-for-raspberry-pi-display-not-working/27073/20 "2025-01-23T09:31:41Z")

</div>

I think that one’s caused by having the old apt version of numpy around:

> <https://github.com/pimoroni/pirate-audio/issues/104>
>
> \- Platform/operating system: \*\*Raspberry Pi Zero Running Latest Raspberry Pi Bo…okworm 32-bit\*\*
> 
> \- Python version: \*\*Python 3.11.2\*\*
> 
> When manually installing the Pirate Audio drivers for Mopid, specifically running \`sudo pip3 install Mopidy-PiDi pidi-display-pil pidi-display-st7789 mopidy-raspberry-gpio --break-system-packages\` Pip would log \`Collecting numpy\>=1.26.4\`, and try to install a newer version of Numpy than the one provided by Apt, which is 1.24, (this was also logged by Mopidy in \`pkg\_resources.ContextualVersionConflict: (numpy 1.24.2 (/usr/lib/python3/dist-packages), Requirement.parse('numpy\>=1.26.4'), {\>\`. The problem is installing Numpy through Pip instead of Apt would cause the Pirate Audio display to be blank and give the following error: 
> \`\`\`
> Traceback (most recent call last):
> File "/usr/local/lib/python3.11/dist-packages/numpy/\_core/\_\_init\_\_.py", line 23, in \<module\>
> from . import multiarray
> File "/usr/local/lib/python3.11/dist-packages/numpy/\_core/multiarray.py", line 10, in \<module\>
> from . import overrides
> File "/usr/local/lib/python3.11/dist-packages/numpy/\_core/overrides.py", line 8, in \<module\>
> from numpy.\_core.\_multiarray\_umath import (
> ImportError: libopenblas.so.0: cannot open shared object file: No such file or directory
> \`\`\`
>  
> The solution for that was to first uninstall the Numpy apt package, then run \`sudo apt-get install libopenblas-dev\` followed by \`sudo pip install numpy --break-system-packages\`, then re-run \`sudo pip3 install Mopidy-PiDi pidi-display-pil pidi-display-st7789 mopidy-raspberry-gpio\` which finally fixed the problem, and now the screen is working.

[Next page](https://forums.pimoroni.com/t/pirate-audio-headphone-amp-for-raspberry-pi-display-not-working/27073.md?page=2)
