Skip to content

Instantly share code, notes, and snippets.

@gladson
Last active September 24, 2016 00:44
Show Gist options
  • Save gladson/88dd17220b443707cbe12f68d3b5b7eb to your computer and use it in GitHub Desktop.
Save gladson/88dd17220b443707cbe12f68d3b5b7eb to your computer and use it in GitHub Desktop.
OpenCV - instalação

INSTALAÇÃO DO OpenCV

1 - Instalação OpenCV no ubuntu ou debian

$ sudo apt-get install libopencv-dev python-opencv

1.1 - Remoção do pacote

$ sudo apt-get autoremove libopencv-dev python-opencv

2 - Instalação do OpenCV do site oficial

Faça download do arquivo: INSTALL-OpenCV.sh

$ bash install-opencv.sh

Virtualenv

$ pip install virtualenv
$ virtualenv env
$ source env/bin/activate

OpenCV-Python

Para acessar o Pack: OpenCV-Python

(env)$ pip install opencv-python
Collecting opencv-python
  Downloading opencv_python-3.1.0.2-cp27-cp27mu-manylinux1_x86_64.whl (6.2MB)
    100% |████████████████████████████████| 6.2MB 
Collecting numpy>=1.11.1 (from opencv-python)
  Downloading numpy-1.11.1-cp27-cp27mu-manylinux1_x86_64.whl (15.3MB)
    100% |████████████████████████████████| 15.3MB 
Installing collected packages: numpy, opencv-python
Successfully installed numpy-1.11.1 opencv-python-3.1.0.2

(env)$ python
Python 2.7.12 (default, Jul  1 2016, 15:12:24) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment