conservationtechlab / dencam

Polar bear maternal den observation system.
MIT License
5 stars 2 forks source link

Notes on what is required to update to Pi 5/Bookworm/picamera2 #78

Open sumi1194 opened 3 months ago

sumi1194 commented 3 months ago

Creating issue to capture change points necessary for upgrading to Raspberry Pi 5/Bookworm

sumi1194 commented 3 months ago

Setting up virtual environments

Bookworm requires a virtual environment for pip installation packages. sudo pip is no longer allowed. The file structure is also different so set up for virtual environments is slightly changed.

Install virtual environment packages sudo apt install virtualenv virtualenvwrapper

Add to bash file:

echo -e "\n# Virtual environment setup" >> ~/.bashrc
echo "export WORKON_HOME=~/.virtualenvs" >> ~/.bashrc
echo "export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3" >> ~/.bashrc
echo "source /usr/share/virtualenvwrapper/virtualenvwrapper.sh" >> ~/.bashrc
source ~/.bashrc

Restart terminal

Create new virtualenv: mkvirtualenv --system-site-packages <venv>

This is espeically important if you are using libcamera (picamera), since it is not yet on pypi

sumi1194 commented 3 months ago

GPIO Pins

RPI.GPIO and wiringpi are no longer supported on raspberry pi 5. The recommended GPIO package is gpiozero. Documentation: https://gpiozero.readthedocs.io/en/stable/index.html