I would like to keep everything contained within the virtualenv. Is this possible with OpenCV? I'm fine with building from scratch, do I just need to setup the virtualenv first then use special compile flags to tell it where to install to?
We also learned which package to install and how to create a virtual environment for working on the package. For all purposes of learning computer vision using Python, we highly recommend installing opencv-contrib-python using prebuilt binaries.
OpenCV 3 works with Python 2.7, 3.4, 3.5, 3.6 and 3.7. The unofficial OpenCV PyPi wheels work for Linux, Mac and Windows.
I found the solution was that I had to copy over cv2.so and cv.py to the directory running the virtualenv, then pip install numpy. To do this on Ubuntu 12.04 I used.
virtualenv virtopencv cd virtopencv cp /usr/local/lib/python2.7/dist-packages/cv* ./lib/python2.7/site-packages/ ./bin/pip install numpy source bin/activate python import cv
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With