Create virtual venv activate install rpio.gpio give permissions X
Get updates from repository
sudo apt-get update
udates the pi
sudo apt upgrade
Install python3 if not found or not installed
sudo apt install python3
Instlall venv module for python3
sudo apt install python3-venv
Create virtual enviroment
python3 -m venv myvenv
Activate the virtual enviroment
. myvenv/bin/activate
intall the rpi gpio libary
pip install RPI.GPIO
give permissions so you can access the pins
sudo usermod -aG gpio user_name
Set permissions to the directory so we can read right execute the files
sudo chmod -R 770 /home/user_name/myvenv
install pillow for image libary
pip install pillow
Command copied to clipboard!