Running bookworm on Pi5. I have created a virtual environment in /home/pi/.venv
I am having trouble installing picamera2
If I follow the instructions in picamera-manual-4.pdf to installit seems to complete OK
if I call it in python script or interpreter I get
ModuleNotFoundError: No module named 'picamera2'
The home page for picamera2 https://pypi.org/project/picamera2/ says to install withIf I do that I get this errorHow can I resolve this?
Thanks
Mick
I am having trouble installing picamera2
If I follow the instructions in picamera-manual-4.pdf to install
Code:
sudo apt install -y python3-picamera2
if I call it in python script or interpreter I get
ModuleNotFoundError: No module named 'picamera2'
The home page for picamera2 https://pypi.org/project/picamera2/ says to install with
Code:
pip install picamera2
Code:
(.venv) pi@pi-5-wi:~/v02_1 $ pip install picamera2Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simpleCollecting picamera2 Using cached https://www.piwheels.org/simple/picamera2/picamera2-0.3.17-py3-none-any.whl (76 kB)Requirement already satisfied: numpy in /home/pi/.venv/lib/python3.11/site-packages (from picamera2) (1.26.4)Collecting PiDNG Using cached pidng-4.0.9.tar.gz (21 kB) Preparing metadata (setup.py) ... doneCollecting piexif Using cached https://www.piwheels.org/simple/piexif/piexif-1.1.3-py2.py3-none-any.whl (20 kB)Collecting pillow Using cached pillow-10.2.0-cp311-cp311-manylinux_2_28_aarch64.whl (4.3 MB)Requirement already satisfied: simplejpeg in /home/pi/.venv/lib/python3.11/site-packages (from picamera2) (1.7.2)Collecting v4l2-python3 Using cached https://www.piwheels.org/simple/v4l2-python3/v4l2_python3-0.3.4-py3-none-any.whl (22 kB)Collecting python-prctl Using cached python-prctl-1.8.1.tar.gz (28 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [1 lines of output] You need to install libcap development headers to build this module [end of output] note: This error originates from a subprocess, and is likely not a problem with pip.error: metadata-generation-failed× Encountered error while generating package metadata.╰─> See above for output.note: This is an issue with the package mentioned above, not pip.hint: See above for details.(.venv) pi@pi-5-wi:~/v02_1 $
Thanks
Mick
Statistics: Posted by micksulley — Sun Mar 17, 2024 3:35 pm — Replies 0 — Views 25