Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module 'cv2' has no attribute 'face' #7

Open
WBTHL opened this issue Feb 20, 2019 · 3 comments
Open

module 'cv2' has no attribute 'face' #7

WBTHL opened this issue Feb 20, 2019 · 3 comments

Comments

@WBTHL
Copy link

WBTHL commented Feb 20, 2019

I got this error while trying to run 02_face_training.py. I think I got opencv_contrib successfully installed by following Adrian Rosebrock's Raspbian Stretch: Install OpenCV 3 + Python on your Raspberry Pi. cv2.version also returns the correct value.

Some answers from Stackoverflow suggest running these command: pip install opencv-python and pip install OpenCV-contrib-python. After doing that, however, import cv2 gets an error and version check fails as well.

So, anyone got a solution?

PS: Pillow is installed and I'm doing all of these within the 'cv' virtual environment.

@Veeupup
Copy link

Veeupup commented Mar 11, 2019

@WBTHL I have met the same problem and I found the solution at StackOverflow.
You should try
pip install opencv-contrib-python
and it should work after you execute it.
As it works fine for me.

@WBTHL
Copy link
Author

WBTHL commented Mar 11, 2019

@Veeupup Thanks for your reply!

After checking the build folder for OpenCV installation, I finally find out what's wrong. All modules from opencv_contrib are not installed due to a silly typing error during the installation... And that explains why I'm missing the 'face' module. Thanks again!

@mdfarhan0203
Copy link

@WBTHL I have met the same problem and I found the solution at StackOverflow.
You should try
pip install opencv-contrib-python
and it should work after you execute it.
As it works fine for me.

after doing all stiilll it is not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants