conservationtechlab / dencam

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

Updates for Raspberry Pi 5/Bookworm #78

Open sumi1194 opened 3 weeks ago

sumi1194 commented 3 weeks ago

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

sumi1194 commented 3 weeks 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 weeks 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