Posts: 354
Joined: Sat Jul 15, 2017 12:40 pm
Location: Boston MA.

opencv without virtual env

Wed Jan 17, 2018 4:33 pm

Hello, I followed this link, installed opcv on my pi3 successfully. ... pberry-pi/. Now I don't see the need to have a virtual environment, Is there a way. to take it out of the virtualenv without re-compilling all over again? Thanks.

Posts: 354
Joined: Sat Jul 15, 2017 12:40 pm
Location: Boston MA.

Re: opencv without virtual env

Thu Jan 18, 2018 11:49 pm

How do I take out the virtualenv? Base on the same tutorial, do I just need to re-compile the whole thing over but skip the section virtualenv(step 4) ? sudo pip install virtualenv virtualenvwrapper? I thought I did that but then it just made opencv avail not in python3. I like to just use python3 with the virtualenv

User avatar
Posts: 235
Joined: Wed Apr 25, 2012 9:40 am
Location: Rietberg/Germany

Re: opencv without virtual env

Sun Mar 11, 2018 2:53 pm

Raspberry pi 3, Stretch

I too am trying to install OPENCV with out Virtualenv because the Pi is dedicated to OPENCV3.3.1 and Python 3.

I have installed OPENCV3.3.1 before using virtualenv with no problems.

1) However, I am getting an issue. Opencv builds only to python 2.7 even though I have change to default python 2.7 to python 3 by using :

sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.5 2
in my self-written configuration script script.

$ python --version
Python 3.5.3
which is what I want.

After the BUILD, I pause my script ( using a read) to observe the build output.
The entries for python2.7 are there but only one entry for Python3 showing where the python3 is located..

I have a feeling that although python --version gives me python 3.5 I am not really in the full python3 environment.

2. Another issue:
I keep getting
replace opencv_contrib-3.3.1/.gitattributes? [y]es, [n]o, [A]ll, [N]one, [r]ename: N
replace opencv-3.3.1/.tgitconfig? [y]es, [n]o, [A]ll, [N]one, [r]ename: N
--2018-03-11 15:35:05-- ... /

Any help on these two issues?

PS: I do hope that python 3 gets made to be the default Python very very soon - Python2 is old hat /b]

Return to “Python”