Skip to content

Installation & numpy import errors on Pi Zero W running Raspberry Pi OS Trixie #85

@Viotoxin

Description

@Viotoxin

Let me preface this by saying I'm new to linux, new to gihub, new to raspberry pi so please bear with me.

I'm installing RapsiCamSrv on a headless Raspberry Pi Zero W running Raspberry Pi OS Trixie. I'm installing via SSH. It was a fresh installation of Raspberry Pi OS, aside from running sudo apt update && sudo apt upgrade

When using the automated installer in the guide, I encountered several errors where it said I didn't have something installed, and the instructions/troubleshooting guide doesn't have any advice for how to resolve this. I don't understand why the installer can't run these for me, or why this isn't mentioned as a possibility in the troubleshooting guide.

First it said I didn't have Flask-SQLAlchemy installed, then matplotlib, then pandas-stubs, and it was erroring during installation at those points, and as a result it was unable to build wheel for pillow. See an example below. If pip's dependency resolver can't check if these are installed for me, why isn't this situation mentioned in the guide?

"Step 11.2: Installing numpy ...
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting numpy
  Using cached https://www.piwheels.org/simple/numpy/numpy-2.4.2-cp313-cp313-linux_armv7l.whl (6.0 MB)
Installing collected packages: numpy
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
types-seaborn 0.13.2 requires matplotlib>=3.8; python_version >= "3.9", which is not installed.
types-seaborn 0.13.2 requires pandas-stubs, which is not installed.
Successfully installed numpy-2.4.2
"

I ended up having to figure out how to activate the venv and manually install Flask-SQLAlchemy, matplotlib, then pandas-stubs — the guide doesn't mention how to use the source command to do this or that you might need to.

Once i got past step 11.2 I noticed the next step is... installing matplotlib. Which I just did, I thought?

Then it got to step 12 where it had an error:

Step 12: Initializing database ...
Error: While importing 'raspiCamSrv', an ImportError was raised:

Traceback (most recent call last):
  File "/home/picam/prg/raspi-cam-srv/.venv/lib/python3.13/site-packages/numpy/_core/__init__.py", line 24, in <module>
    from . import multiarray
  File "/home/picam/prg/raspi-cam-srv/.venv/lib/python3.13/site-packages/numpy/_core/multiarray.py", line 11, in <module>
    from . import _multiarray_umath, overrides
ImportError: 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/picam/prg/raspi-cam-srv/.venv/lib/python3.13/site-packages/flask/cli.py", line 245, in locate_app
    __import__(module_name)
    ~~~~~~~~~~^^^^^^^^^^^^^
  File "/home/picam/prg/raspi-cam-srv/raspiCamSrv/__init__.py", line 6, in <module>
    from picamera2 import Picamera2
  File "/usr/lib/python3/dist-packages/picamera2/__init__.py", line 8, in <module>
    from .converters import YUV420_to_RGB
  File "/usr/lib/python3/dist-packages/picamera2/converters.py", line 1, in <module>
    import numpy as np
  File "/home/picam/prg/raspi-cam-srv/.venv/lib/python3.13/site-packages/numpy/__init__.py", line 112, in <module>
    from numpy.__config__ import show_config
  File "/home/picam/prg/raspi-cam-srv/.venv/lib/python3.13/site-packages/numpy/__config__.py", line 4, in <module>
    from numpy._core._multiarray_umath import (
    ...<3 lines>...
    )
  File "/home/picam/prg/raspi-cam-srv/.venv/lib/python3.13/site-packages/numpy/_core/__init__.py", line 85, in <module>
    raise ImportError(msg) from exc
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: Python 3.13 from "/home/picam/prg/raspi-cam-srv/.venv/bin/python3"
  * The NumPy version is: "2.4.2"

and make sure that they are the versions you expect.

Please carefully study the information and documentation linked above.
This is unlikely to be a NumPy issue but will be caused by a bad install
or environment on your machine.

Original error was: libopenblas.so.0: cannot open shared object file: No such file or directory

Usage: python -m flask [OPTIONS] COMMAND [ARGS]...
Try 'python -m flask --help' for help.

Error: No such command 'init-db'.

Note that the python3 version installed is 3.13, and numpy version 2.4.2 is installed in the venv.

Following the troubleshooting guide linked in the error, I see a general recommendation to reinstall numpy, which did not work, but I don't see anything about the specific error I'm seeing, so I'm not sure where to go from here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions