Set up a virtual enviroment with code craft
Create a folder named project in your home directory
mkdir project
change the terminal to your new project folder
cd project
....user_name@raspberrypi:/project~$
Create a venv named venv in our project folder
python3 -m venv venv
Activate the virtual enviroment so we can install libarys and module
. venv/bin/activate
....(venv)user_dir@raspberrypi:/project~$
Install RPI.GPIO libary module into the virtual enviroment
pip install RPIO.GPIO
Add our user_name to the group gpio so we can use and access the pins
sudo usermod -aG gpio user_name
set the permissions so you can access and execute the files in our project folder
sudo chmod -R 770 /home/user_name/project
Command copied to clipboard!