diff --git a/stage-gl1/01-install-python-libraries/00-run-chroot.sh b/stage-gl1/01-install-python-libraries/00-run-chroot.sh index a47a733..ded34e2 100755 --- a/stage-gl1/01-install-python-libraries/00-run-chroot.sh +++ b/stage-gl1/01-install-python-libraries/00-run-chroot.sh @@ -1,7 +1,8 @@ #!/bin/bash -e -# set up a groundlight virtual environment for python -python3 -m venv /opt/groundlight/gl-py +# Set up a groundlight virtual environment for python. --system-site-packages is +# required for picamera2. +python3 -m venv /opt/groundlight/gl-py --system-site-packages source /opt/groundlight/gl-py/bin/activate # Now install the groundlight python libraries @@ -9,6 +10,11 @@ pip install groundlight # framegrab will install opencv-python, numpy, and pillow pip install framegrab +# Install picamera2, required for use of Raspberry Pi CSI2 cameras. Note that there is +# an option to install through pip, but that is not the reccommended installation +# method. --no-install-recommends prevents installation of GUI dependencies. +sudo apt install -y python3-picamera2 --no-install-recommends + # add a .bashrc entry to activate the groundlight virtual environment echo "source /opt/groundlight/gl-py/bin/activate" >> /home/${FIRST_USER_NAME}/.bashrc