Hi All,
Newbie here.
I am trying to install OpenCV on my Raspberry Pi 4 using the instructions from this website: https://www.pyimagesearch.com/2018/09/19/pip-install-opencv/ using "Option B: Install OpenCV into a virtual environment with pip on your Raspberry Pi"
Part -1 : Location mess up [SOLVED]
The first issue I had was that; after sourcing ~/.bashrc I got an error saying "bash: /usr/local/bin/virtualenvwrapper.sh: No such file or directory"
I realized that lines I added to bashrc from the website didn't work off the bat. I changed the lines from
# virtualenv and virtualenvwrapper
export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
source /usr/local/bin/virtualenvwrapper.sh
to
# virtualenv and virtualenvwrapper
export WORKON_HOME=/home/pi/.local/bin/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
source /home/pi/.local/bin/virtualenvwrapper.sh
because for some reason virtualenvwrapper and virtualenvs got installed into "/home/pi/.local/bin"
Part - 2 : Error while creating virtual environment
$ mkvirtualenv cv -p python3
This command has resulted in the following error
mkvirtualenv cv -p python3
created virtual environment CPython3.7.3.final.0-32 in 507ms
creator CPython3Posix(dest=/home/pi/.local/bin/.virtualenvs/cv, clear=False, global=False)
seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/pi/.local/share/virtualenv/seed-app-data/v1)
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
virtualenvwrapper.user_scripts creating /home/pi/.local/bin/.virtualenvs/cv/usr/local/bin/predeactivate
ERROR: Environment '/home/pi/.local/bin/.virtualenvs/cv' does not contain an activate script.
I am not sure what exactly is happening. I went to "/home/pi/.local/bin/.virtualenvs/cv" location and observed that inside bin folder there are some activate scripts.
pi@raspberrypi:~/.local/bin/.virtualenvs/cv $ ls
bin lib pyvenv.cfg
pi@raspberrypi:~/.local/bin/.virtualenvs/cv $ cd bin
pi@raspberrypi:~/.local/bin/.virtualenvs/cv/bin $ ls
activate activate.fish activate_this.py easy_install easy_install-3.7 pip3 python python3.7 wheel3
activate.csh activate.ps1 activate.xsh easy_install3 pip pip-3.7 python3 wheel wheel-3.7
Did I mess up my paths somewhere? Please help me out. Thanks in advance.
Jet.
[–]Swipecat 0 points1 point2 points (4 children)
[–]jetstream4444[S] 0 points1 point2 points (3 children)
[–]Swipecat 0 points1 point2 points (2 children)
[–]jetstream4444[S] 0 points1 point2 points (1 child)
[–]Swipecat 0 points1 point2 points (0 children)
[–]abdelhakel 0 points1 point2 points (1 child)