I had another attempt to re-install the display hat mini.
It went well with no warnings but showed this:
Installing collected packages: gpiod, spidev, numpy, gpiodevice, st7789, displayhatmini
Attempting uninstall: spidev
Found existing installation: spidev 3.5
Not uninstalling spidev at /usr/lib/python3/dist-packages, outside environment /usr
Can’t uninstall ‘spidev’. No files were found to uninstall.
Attempting uninstall: numpy
Found existing installation: numpy 1.19.5
Not uninstalling numpy at /usr/lib/python3/dist-packages, outside environment /usr
Can’t uninstall ‘numpy’. No files were found to uninstall.
Successfully installed displayhatmini-0.0.2 gpiod-2.2.2 gpiodevice-0.0.5 numpy-2.0.2 spidev-3.6 st7789-1.0.1
Done!
If I try to run any of the examples this is what I get:
python3 pwm-backlight.py
Traceback (most recent call last):
File “/home/fern/.local/lib/python3.9/site-packages/numpy/_core/init.py”, line 23, in
from . import multiarray
File “/home/fern/.local/lib/python3.9/site-packages/numpy/_core/multiarray.py”, line 10, in
from . import overrides
File “/home/fern/.local/lib/python3.9/site-packages/numpy/_core/overrides.py”, line 8, in
from numpy._core._multiarray_umath import (
ImportError: libopenblas.so.0: cannot open shared object file: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/home/fern/.local/lib/python3.9/site-packages/numpy/init.py”, line 114, in
from numpy.config import show as show_config
File “/home/fern/.local/lib/python3.9/site-packages/numpy/config.py”, line 4, in
from numpy._core._multiarray_umath import (
File “/home/fern/.local/lib/python3.9/site-packages/numpy/_core/init.py”, line 49, in
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
- The Python version is: Python3.9 from “/usr/bin/python3”
- The NumPy version is: “2.0.2”
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: libopenblas.so.0: cannot open shared object file: No such file or directory
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File “/home/fern/Pimoroni/displayhatmini/examples/pwm-backlight.py”, line 3, in
from displayhatmini import DisplayHATMini
File “/home/fern/.local/lib/python3.9/site-packages/displayhatmini/init.py”, line 2, in
from ST7789 import ST7789
File “/home/fern/.local/lib/python3.9/site-packages/ST7789.py”, line 3, in
from st7789 import * # noqa F403
File “/home/fern/.local/lib/python3.9/site-packages/st7789/init.py”, line 26, in
import numpy
File “/home/fern/.local/lib/python3.9/site-packages/numpy/init.py”, line 119, in
raise ImportError(msg) from e
ImportError: Error importing numpy: you should not try to import numpy from
its source directory; please exit the numpy source tree, and relaunch
your python interpreter from there.