Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4919

Troubleshooting • Re: Issues installing OpenCV Virtual Enviroment

$
0
0
It's very simple :) to install and configure virtualenv on rpi5. I had same problem during package installation. I tested the solution on my rpi5.
Follow the given steps.

Step1: Install required packages

sudo apt install python3.11 virtualenv
sudo apt install python3.11 virtualenvwrapper


Step2:
Create .virtualenvs folder in your home directory
mkdir ~/.virtualenvs


Step3: Search for virtualenvwrapper.sh
whereis virtualenvwrapper (This will provide the path to virtualenvwrapper.sh,
in my systems it was located at /usr/share/virtualenvwrapper/virtualenvwrapper.sh)


Step4: Make changes under ~/.bashrc
Open your favourite editor and append the following line in .bashrc file at the end. I am using vim editor for this.

vim ~/.bashrc
export WORKON_HOME=$HOME/.virtualenvs
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3.11
source /usr/share/virtualenvwrapper/virtualenvwrapper.sh

Save the file and exit


Step5:
source ~/.bashrc


Step6: Create your virtual environment
mkvirtualenv <your env name>

Statistics: Posted by modvision — Wed May 01, 2024 6:44 pm



Viewing all articles
Browse latest Browse all 4919

Trending Articles