title: Opencv3 and Python 2.7 on Virtual Environment - AttributeError: 'module' object has no attribute 'createLBPHFaceRecognizer'
body: <p>I have a python function with opencv 3. it works without virtual environment.Also I installed opencv on venv from:<a href="http://www.pyimagesearch.com/2015/06/22/install-opencv-3-0-and-python-2-7-on-ubuntu/" rel="nofollow noreferrer">pyimagesearch</a>. i am trying to run that python function on venv, then it gives an error : </p>
  
  <pre><code>AttributeError: 'module' object has no attribute 'createLBPHFaceRecognizer'
  </code></pre>
  
  <p>without venv in terminal:</p>
  
  <pre><code>gkhan@Gkan ~/Masaüstü/face_recognizer $ python face_recognizer.py
  Yol :./sinif/114.jpg.
  114 Yuz Tanindi 12
  </code></pre>
  
  <p>with venv in terminal:</p>
  
  <pre><code>gkhan@Gkan ~/Masaüstü/face_recognizer $ workon cv
  (cv)gkhan@Gkan ~/Masaüstü/face_recognizer $ python face_recognizer.py
  Traceback (most recent call last):
    File "face_recognizer.py", line 15, in &lt;module&gt;
      recognizer = cv2.createLBPHFaceRecognizer()
  AttributeError: 'module' object has no attribute 'createLBPHFaceRecognizer'
  </code></pre>
  
  <p>my python code:</p>
  
  <pre><code>#!/usr/bin/python
  # -*- coding: utf-8 -*-
  
  import cv2, os
  import numpy as np
  from PIL import Image
  
  # For Test
  if 0==0:
  
      cascadePath = "haarcascade_frontalface_default.xml"
      faceCascade = cv2.CascadeClassifier(cascadePath)
  
      recognizer = cv2.createLBPHFaceRecognizer()
  ...
  </code></pre>
  
  <p>I am running Opencv3 with python 2.7 on Linux Mint 64 Bit</p>