MotorCityCobra / face_ripper_9000

Creates 256 cropped, high quality facesets from a batch of mp4 videos end to end
MIT License
30 stars 10 forks source link

CV2 installed, but demo.py unable to import it? #3

Closed deepshakes closed 6 years ago

deepshakes commented 6 years ago

When I try to run

python3 demo.py -i 'example/path/pic.jpg' -v 'example/path/videos'

I get an error message saying

Traceback (most recent call last):
  File "demo.py", line 3, in <module>
    import cv2
ImportError: No module named 'cv2'

But from the same directory, I can open up python and run

>>> import cv2
>>> cv2.__version__

And it'll spit out '3.4.0' so It's definitely installed? Any idea what might be causing this? @MotorCityCobra Do the directories have to be laid out in a specific way?

deepshakes commented 6 years ago

Fixed it with pip3 install opencv-python which I assumed was already installed. I'm now getting a different error, but from googling around a bit it looks like I might be able to fix it by upgrading to the latest macOS version, so I'll give that a go.

MotorCityCobra commented 6 years ago

Good luck. If that doesn't work be sure to try running 'demo.py' with python, python3, python3.4, python3.5, python3.6.
In my conda environment I can only get this script to run by typing python3.5 and nothing else.

If that doesn't work set everything up in a different environment. Meaning, if you're using a conda env now use a virtualenv instead, or vice versa.

MotorCityCobra commented 6 years ago

I'm closing because it's a cv2 issue.
Hope you sorted it out.