Arminius-Software / face2video

MIT License
77 stars 7 forks source link

No module named 'cv2' #1

Closed barepixels closed 10 months ago

barepixels commented 10 months ago

No module named 'cv2' but I have opencv-python installed

cv2b

Arminius-Software commented 10 months ago

Hi, try the following.

"python -m pip install --upgrade pip" "pip uninstall opencv-python" "python -m pip install opencv-python"

If that does not work let me know.

barepixels commented 10 months ago

sadly it did not work 1) upgraded pip 2) Successfully uninstalled opencv-python-4.8.0.76 3) Successfully installed opencv-python-4.8.1.78

cv2c

Arminius-Software commented 10 months ago

I just tested it again in a clean virtual environment, and these are all the libraries that the installer should download for you:

certifi==2023.11.17 charset-normalizer==3.3.2 colorama==0.4.6 decorator==4.4.2 idna==3.4 imageio==2.33.0 imageio-ffmpeg==0.4.9 moviepy==1.0.3 numpy==1.26.2 opencv-contrib-python==4.8.1.78 opencv-python==4.8.0.76 Pillow==10.1.0 proglog==0.1.10 requests==2.31.0 tqdm==4.66.1 urllib3==2.1.0

I assume you have something old installed that is causing conflicts. But you can simply run the program in a virtual environment. First, place the video and face files into the folders and enter the paths into main.py. Then, go into cmd with the path to the project. Finally, run the following commands:

"python -m venv venv" "venv\Scripts\activate" "python install.py" "python main.py"

barepixels commented 10 months ago
"python -m venv venv"
"venv\Scripts\activate"
"python install.py"
"python main.py"

it's working now. thank you. extracted_frames folder starts to fill up

Arminius-Software commented 10 months ago

Awesome!