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

Error: No module named 'cv2' when generating train data #26

Open
brunofrancisco opened this issue Jul 20, 2018 · 4 comments
Open

Error: No module named 'cv2' when generating train data #26

brunofrancisco opened this issue Jul 20, 2018 · 4 comments

Comments

@brunofrancisco
Copy link

Hi. I cloned this repo, then created the conda environment from file (Mac OS) and dowloaded the dataSet (angela_merkel_speech.mp4 and shape_predictor_68_face_landmarks.dat). OBS: I placed the both files of the dataSet inside the face2face-demo folder. Finally I run the follow command inside the project folder, but something went wrong.

face2face-demo] $ python generate_train_data.py --file angela_merkel_speech.mp4 --num 400 --landmark-model shape_predictor_68_face_landmarks.dat
Traceback (most recent call last):
File "generate_train_data.py", line 2, in
import cv2
ModuleNotFoundError: No module named 'cv2'

@0oshowero0
Copy link

This is because you don't have opencv library. Try to install it first:

pip install opencv-python

@WrathofBhuvan11
Copy link

WrathofBhuvan11 commented Dec 27, 2018

I guess you are using pyline Visual code editor... Once there was a report of this error
I think you got to change some settings in vs code
Or try spyder use Anaconda

@Willianflower
Copy link

Maybe you dont activate environment face2face-demo

@djebel-amila
Copy link

This is because you don't have opencv library. Try to install it first:

pip install opencv-python

For some reason, the - menpo::opencv3=3.1.0=py35_0 install from environment.yml didn’t work for me either. This pip install solved it, thanks.

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

5 participants