hacksider / Deep-Live-Cam

real time face swap and one-click video deepfake with only a single image
GNU Affero General Public License v3.0
34.95k stars 4.93k forks source link

Conflicting dependencies #171

Open amurlynx opened 1 month ago

amurlynx commented 1 month ago

I get errors when I try to install dependencies. OS: Windows 11 23H2 Python: Python 3.11.5

ERROR: Cannot install -r .\requirements.txt (line 13), -r .\requirements.txt (line 4), -r .\requirements.txt (line 5), -r .\requirements.txt (line 6), numpy==1.23.5 and onnxruntime-gpu==1.18.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested numpy==1.23.5
    opencv-python 4.8.1.78 depends on numpy>=1.21.2; python_version >= "3.10"
    opencv-python 4.8.1.78 depends on numpy>=1.23.5; python_version >= "3.11"
    opencv-python 4.8.1.78 depends on numpy>=1.17.0; python_version >= "3.7"
    opencv-python 4.8.1.78 depends on numpy>=1.17.3; python_version >= "3.8"
    opencv-python 4.8.1.78 depends on numpy>=1.19.3; python_version >= "3.9"
    onnx 1.16.0 depends on numpy>=1.20
    insightface 0.7.3 depends on numpy
    torchvision 0.15.2+cu118 depends on numpy
    onnxruntime-gpu 1.18.0 depends on numpy>=1.26.0

Has anyone been able to resolve this dependency error?

hung-tq commented 1 month ago

You can change onnxruntime-gpu==1.18.0 to onnxruntime-gpu==1.15.1 I am reinstalling and I do not have known any errors with that modify yet.

Man-Dark commented 1 month ago

I am using Windows 11. I solved it by editing the requirements file in the folder. just replace these specific two lines of "numpy" and "onnxruntime-gpu" with the following lines and save the document and try installing the requirements again:

numpy>=1.23.5,<1.27

onnxruntime-gpu>=1.18.0,<1.27; sys_platform != 'darwin'

Man-Dark commented 1 month ago

@AgentMC Hey buddy I am not a developer or something I just put that error in Chat GPT and it gave me the solution which worked for me and the software is running smoothly without any issues.

zPhenomm commented 1 month ago

Had the same issue with Python 3.11, onnxruntime-gpu 1.18.0 depends on numpy>=1.26.0 while numpy ==1.23.5 is being installed. Switching to Python 3.10 resolved this for me.