Closed lgeitner closed 2 months ago
Hi, it seems that the picamera2 library is not installed on your system or it is not reacheable.
Could you please look at the Picamera2 Manual in chapter 2. to verify that the package is installed.
Normally the picamera2 package is located at /usr/lib/python3/dist-packages/picamera2
If picamara2 is not on your system , chapter 2.2 instructs how to install it. Please note that a pip install is not recommended.
I just recognize that you made a 'lite' installation. Probably picamera2 is not included there.
If you have a chance, try a system setup with Raspberry Pi Imager version 1.8.4 or later.
Solution was to run the below command as mentioned in the picamera2 manual top of page 6. The below command will install picamera2 without the GUI dependencies.
sudo apt install -y python3-picamera2 --no-install-recommends
Thank You, Lance
Thanks for the info. I have adjusted the description for installation. Added step 8.
Using a fresh image of 2023-12-11-raspios-bookworm-arm64-lite.img.xz
Raspberry PI OS Lite 64 Bit Bookworm on a Raspberry PI 5
After connecting through ssh I ran the following commands:
sudo apt update sudo apt full-upgrade -y mkdir prg cd prg sudo apt install git -y git clone https://github.com/signag/raspi-cam-srv cd raspi-cam-srv python -m venv --system-site-packages .venv cd ~/prg/raspi-cam-srv source .venv/bin/activate pip install Flask==3.0.0
when I entered 'flask --app raspiCamSrv init-db' I received the error below.
(.venv) pi@pitest:~/prg/raspi-cam-srv $ flask --app raspiCamSrv init-db Traceback (most recent call last): File "/home/pi/prg/raspi-cam-srv/.venv/bin/flask", line 8, in
sys.exit(main())
^^^^^^
File "/home/pi/prg/raspi-cam-srv/.venv/lib/python3.11/site-packages/flask/cli.py", line 1064, in main
cli.main()
File "/home/pi/prg/raspi-cam-srv/.venv/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/home/pi/prg/raspi-cam-srv/.venv/lib/python3.11/site-packages/click/core.py", line 1682, in invoke
cmd_name, cmd, args = self.resolve_command(ctx, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/prg/raspi-cam-srv/.venv/lib/python3.11/site-packages/click/core.py", line 1729, in resolve_command
cmd = self.get_command(ctx, cmd_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/prg/raspi-cam-srv/.venv/lib/python3.11/site-packages/flask/cli.py", line 579, in get_command
app = info.load_app()
^^^^^^^^^^^^^^^
File "/home/pi/prg/raspi-cam-srv/.venv/lib/python3.11/site-packages/flask/cli.py", line 309, in load_app
app = locate_app(import_name, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/prg/raspi-cam-srv/.venv/lib/python3.11/site-packages/flask/cli.py", line 236, in locate_app
return find_best_app(module)
^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/prg/raspi-cam-srv/.venv/lib/python3.11/site-packages/flask/cli.py", line 64, in find_best_app
app = app_factory()
^^^^^^^^^^^^^
File "/home/pi/prg/raspi-cam-srv/raspiCamSrv/init.py", line 71, in create_app
from . import home
File "/home/pi/prg/raspi-cam-srv/raspiCamSrv/home.py", line 4, in
from raspiCamSrv.camera_pi import Camera
File "/home/pi/prg/raspi-cam-srv/raspiCamSrv/camera_pi.py", line 9, in
from picamera2 import Picamera2, CameraConfiguration, StreamConfiguration, Controls
ModuleNotFoundError: No module named 'picamera2'