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
39.27k stars 5.71k forks source link

pip install -r requirements.txt stop work #419

Closed sdyuyouth closed 6 days ago

sdyuyouth commented 2 months ago

D:\Deep-Live-Cam-main\Deep-Live-Cam-main>pip install -r requirements.txt Defaulting to user installation because normal site-packages is not writeable Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu118 Ignoring torch: markers 'sys_platform == "darwin"' don't match your environment Ignoring torchvision: markers 'sys_platform == "darwin"' don't match your environment Ignoring onnxruntime: markers 'sys_platform == "darwin" and platform_machine != "arm64"' don't match your environment Ignoring onnxruntime-silicon: markers 'sys_platform == "darwin" and platform_machine == "arm64"' don't match your environment Ignoring tensorflow: markers 'sys_platform == "darwin"' don't match your environment Collecting numpy==1.23.5 (from -r requirements.txt (line 3)) Using cached numpy-1.23.5-cp38-cp38-win_amd64.whl.metadata (2.3 kB) Collecting opencv-python==4.8.1.78 (from -r requirements.txt (line 4)) Using cached opencv_python-4.8.1.78-cp37-abi3-win_amd64.whl.metadata (20 kB) Collecting onnx==1.16.0 (from -r requirements.txt (line 5)) Using cached onnx-1.16.0-cp38-cp38-win_amd64.whl.metadata (16 kB) Collecting insightface==0.7.3 (from -r requirements.txt (line 6)) Using cached insightface-0.7.3.tar.gz (439 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting psutil==5.9.8 (from -r requirements.txt (line 7)) Using cached psutil-5.9.8-cp37-abi3-win_amd64.whl.metadata (22 kB) Collecting tk==0.1.0 (from -r requirements.txt (line 8)) Using cached tk-0.1.0-py3-none-any.whl.metadata (693 bytes) Collecting customtkinter==5.2.2 (from -r requirements.txt (line 9)) Using cached customtkinter-5.2.2-py3-none-any.whl.metadata (677 bytes) Collecting pillow==9.5.0 (from -r requirements.txt (line 10)) Using cached Pillow-9.5.0-cp38-cp38-win_amd64.whl.metadata (9.7 kB) Collecting torch==2.0.1+cu118 (from -r requirements.txt (line 11)) Using cached https://download.pytorch.org/whl/cu118/torch-2.0.1%2Bcu118-cp38-cp38-win_amd64.whl (2619.2 MB) Collecting torchvision==0.15.2+cu118 (from -r requirements.txt (line 13)) Using cached https://download.pytorch.org/whl/cu118/torchvision-0.15.2%2Bcu118-cp38-cp38-win_amd64.whl (4.9 MB) Collecting onnxruntime-gpu==1.18.0 (from -r requirements.txt (line 17)) Using cached onnxruntime_gpu-1.18.0-cp38-cp38-win_amd64.whl.metadata (4.4 kB) Collecting tensorflow==2.12.1 (from -r requirements.txt (line 19)) Using cached tensorflow-2.12.1-cp38-cp38-win_amd64.whl.metadata (2.5 kB) Collecting opennsfw2==0.10.2 (from -r requirements.txt (line 20)) Using cached opennsfw2-0.10.2-py3-none-any.whl.metadata (11 kB) Collecting protobuf==4.23.2 (from -r requirements.txt (line 21)) Using cached protobuf-4.23.2-cp38-cp38-win_amd64.whl.metadata (540 bytes) Requirement already satisfied: tqdm==4.66.4 in c:\users\yuesen\appdata\roaming\python\python38\site-packages (from -r requirements.txt (line 22)) (4.66.4) Collecting gfpgan==1.3.8 (from -r requirements.txt (line 23)) Using cached gfpgan-1.3.8-py3-none-any.whl.metadata (12 kB) Requirement already satisfied: requests in c:\users\yuesen\appdata\roaming\python\python38\site-packages (from insightface==0.7.3->-r requirements.txt (line 6)) (2.32.3) Requirement already satisfied: matplotlib in c:\users\yuesen\appdata\roaming\python\python38\site-packages (from insightface==0.7.3->-r requirements.txt (line 6)) (3.7.5) Requirement already satisfied: scipy in c:\users\yuesen\appdata\roaming\python\python38\site-packages (from insightface==0.7.3->-r requirements.txt (line 6)) (1.10.1) Collecting scikit-learn (from insightface==0.7.3->-r requirements.txt (line 6)) Using cached scikit_learn-1.3.2-cp38-cp38-win_amd64.whl.metadata (11 kB) Collecting scikit-image (from insightface==0.7.3->-r requirements.txt (line 6)) Using cached scikit_image-0.21.0-cp38-cp38-win_amd64.whl.metadata (14 kB) Collecting easydict (from insightface==0.7.3->-r requirements.txt (line 6)) Using cached easydict-1.13-py3-none-any.whl.metadata (4.2 kB) Requirement already satisfied: cython in c:\program files\python\lib\site-packages (from insightface==0.7.3->-r requirements.txt (line 6)) (0.29.21) Collecting albumentations (from insightface==0.7.3->-r requirements.txt (line 6)) Using cached albumentations-1.4.14-py3-none-any.whl.metadata (38 kB) Collecting prettytable (from insightface==0.7.3->-r requirements.txt (line 6)) Using cached prettytable-3.11.0-py3-none-any.whl.metadata (30 kB) Collecting darkdetect (from customtkinter==5.2.2->-r requirements.txt (line 9)) Using cached darkdetect-0.8.0-py3-none-any.whl.metadata (3.6 kB) Requirement already satisfied: packaging in c:\users\yuesen\appdata\roaming\python\python38\site-packages (from customtkinter==5.2.2->-r requirements.txt (line 9)) (24.1) Requirement already satisfied: filelock in c:\program files\python\lib\site-packages (from torch==2.0.1+cu118->-r requirements.txt (line 11)) (3.0.12) Requirement already satisfied: typing-extensions in c:\users\yuesen\appdata\roaming\python\python38\site-packages (from torch==2.0.1+cu118->-r requirements.txt (line 11)) (4.12.2) Requirement already satisfied: sympy in c:\users\yuesen\appdata\roaming\python\python38\site-packages (from torch==2.0.1+cu118->-r requirements.txt (line 11)) (1.13.0) Requirement already satisfied: networkx in c:\users\yuesen\appdata\roaming\python\python38\site-packages (from torch==2.0.1+cu118->-r requirements.txt (line 11)) (3.1) Requirement already satisfied: jinja2 in c:\program files\python\lib\site-packages (from torch==2.0.1+cu118->-r requirements.txt (line 11)) (2.11.2) Collecting coloredlogs (from onnxruntime-gpu==1.18.0->-r requirements.txt (line 17)) Using cached coloredlogs-15.0.1-py2.py3-none-any.whl.metadata (12 kB) Collecting flatbuffers (from onnxruntime-gpu==1.18.0->-r requirements.txt (line 17)) Using cached flatbuffers-24.3.25-py2.py3-none-any.whl.metadata (850 bytes) Collecting tensorflow-intel==2.12.1 (from tensorflow==2.12.1->-r requirements.txt (line 19)) Using cached tensorflow_intel-2.12.1-cp38-cp38-win_amd64.whl.metadata (4.1 kB) Collecting gdown>=4.2.0 (from opennsfw2==0.10.2->-r requirements.txt (line 20)) Using cached gdown-5.2.0-py3-none-any.whl.metadata (5.8 kB) Requirement already satisfied: colorama in c:\program files\python\lib\site-packages (from tqdm==4.66.4->-r requirements.txt (line 22)) (0.4.3) Collecting basicsr>=1.4.2 (from gfpgan==1.3.8->-r requirements.txt (line 23)) Using cached basicsr-1.4.2.tar.gz (172 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... |

When running up to this point, the program froze and failed multiple attempts

Updatedme commented 2 months ago

It says the user not rewritable.
Now, this is a problem with your user permission of your Os operating system .

You have to grant your user permission from your operating system permission and make it writable before you proceed with the installation.

beef-not commented 2 months ago

C:\Users\16575\Desktop\Deep-Live-Cam-main>python run.py Traceback (most recent call last): File "C:\Users\16575\Desktop\Deep-Live-Cam-main\run.py", line 3, in from modules import core File "C:\Users\16575\Desktop\Deep-Live-Cam-main\modules\core.py", line 14, in import torch ModuleNotFoundError: No module named 'torch'

C:\Users\16575\Desktop\Deep-Live-Cam-main>pip install -r requirements.txt Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu118 Ignoring torch: markers 'sys_platform == "darwin"' don't match your environment Ignoring torchvision: markers 'sys_platform == "darwin"' don't match your environment Ignoring onnxruntime: markers 'sys_platform == "darwin" and platform_machine != "arm64"' don't match your environment Ignoring onnxruntime-silicon: markers 'sys_platform == "darwin" and platform_machine == "arm64"' don't match your environment Ignoring tensorflow: markers 'sys_platform == "darwin"' don't match your environment Collecting numpy==1.23.5 (from -r requirements.txt (line 3)) Using cached numpy-1.23.5.tar.gz (10.7 MB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [33 lines of output] Traceback (most recent call last): File "C:\Users\16575\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in main() File "C:\Users\16575\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\16575\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 112, in get_requires_for_build_wheel backend = _build_backend() ^^^^^^^^^^^^^^^^ File "C:\Users\16575\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 77, in _build_backend obj = import_module(mod_path) ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\16575\AppData\Local\Programs\Python\Python312\Lib\importlib__init__.py", line 90, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1387, in _gcd_import File "", line 1360, in _find_and_load File "", line 1310, in _find_and_load_unlocked File "", line 488, in _call_with_frames_removed File "", line 1387, in _gcd_import File "", line 1360, in _find_and_load File "", line 1331, in _find_and_load_unlocked File "", line 935, in _load_unlocked File "", line 994, in exec_module File "", line 488, in _call_with_framesremoved File "C:\Users\16575\AppData\Local\Temp\pip-build-env-va64acz\overlay\Lib\site-packages\setuptools__init.py", line 16, in import setuptools.version File "C:\Users\16575\AppData\Local\Temp\pip-build-env-va64acz_\overlay\Lib\site-packages\setuptools\version.py", line 1, in import pkgresources File "C:\Users\16575\AppData\Local\Temp\pip-build-env-va64acz\overlay\Lib\site-packages\pkg_resources\init__.py", line 2172, in register_finder(pkgutil.ImpImporter, find_on_path) ^^^^^^^^^^^^^^^^^^^ AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'? [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

how can i fix it

sdyuyouth commented 2 months ago

 I also used Python 3.12 when the problem occurred, and later solved the problem Double checking all of the basic requirements like Python version, ffmpeg installed or not, and C++ 2022 runtime on the correct OS

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2024年8月23日(星期五) 上午9:31 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [hacksider/Deep-Live-Cam] pip install -r requirements.txt stop work (Issue #419)

C:\Users\16575\Desktop\Deep-Live-Cam-main>python run.py 追溯(最后一次调用): 文件"C:\Users\16575\Desktop\Deep-Live-Cam-main\run.py",第3行,在 从模块导入核心 文件"C:\Users\16575\Desktop\Deep-Live-Cam-main\modules\core.py",第14行,在 进口火炬 模块未找到错误:没有名为“torch”的模块

C:\Users\16575\Desktop\Deep-Live-Cam-main>pip install -r requirements.txt 在索引中查找:https://pypi.org/simple,https://download.pytorch.org/whl/cu118 忽略火炬:标记“sys_platform”=="darwin"与您的环境不匹配 忽略 torchvision:标记'sys_platform == "darwin"'与您的环境不匹配 忽略onnxruntime:标记“sys_platform == “darwin”和platform_machine == “arm64”与您的环境不匹配 忽略on x运行时-silicon:标记“sys_platform==“darwin”和platform_machine==“arm64”不匹配您的环境 忽略tensorflow:标记“sys_platform==“达尔文”与您的环境不匹配 收集 numpy==1.23.5(来自-r requirements.txt(第3行)) 使用缓存的 numpy-1.23.5.tar.gz(10.7 MB) 安装构建依赖项...完成 获取构建轮子的要求... 错误 错误:子进程带错误退出

×获取构建轮子的要求未成功运行。 ←退出代码:1 〖33行输出〗 追溯(最后一次调用): 文件"C:\Users\16575\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py",第353行,在 主要的 文件"C:\Users\16575\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py",335号线,主线路 json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件"C:\Users\16575\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py",在get_require_for_building_wheel中,第112行 后端=构建后端 ^^^^^^^^^^^^^^^^ 文件"C:\Users\16575\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py",第77行,在构建后端 obj=导入模块(mod_path) ^^^^^^^^^^^^^^^^^^^^^^^ 文件“C:\Users\16575\AppData\Local\Programs\Python\Python312\Lib\importlib_初始化.皮“,在import_module中的第90行 返回 _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“”,第1387行,在_gcd_import中 文件“”,第1360行,在_find_and_load中 文件“”,第1310行,在_find_and_load_unlocked中 文件“”,第488行,在_call_with_frames_removed中 文件,第1387行,在gcd_导入 文件,第1360行,在查找并加载 文件,第1331行,在查找并加载解锁 文件,第935行,在加载解锁 exec_module中的第994行的文件 文件,第488行,在调用_删除_帧 文件“C:\Users\16575\AppData\Local\Temp\pip-build-env-va64acz\overlay\Lib\site-packages\setuptools_初始化.皮“,第16行,在 导入setuptools.version 文件“C:\Users\16575\AppData\Local\Temp\pip-build-env-va64acz\overlay\Lib\site-packages\setuptools\version.py“,第一行,在 导入pkg_资源 文件“C:\Users\16575\AppData\Local\Temp\pip-build-env-va64acz\overlay\Lib\site-packages\pkg_resources初始化.皮“,第2172行,在 寄存器查找器(pkgutil)。ImpImporter,在路径上找到 ^^^^^^^^^^^^^^^^^^^ 属性错误:模块'pkgutil'没有属性'ImpImporter'。你是说"拉链进口商"吗 【产出结束】

注意:此错误源于子进程,可能不是pip的问题。 错误:子进程带错误退出

×获取构建轮子的要求未成功运行。 ←退出代码:1 输出见上文。

注意:此错误源于子进程,可能不是pip的问题。

我该怎么弥补

- 直接回复这封邮件,在GitHub上查看,或取消订阅. @.***>

phpmooc commented 1 month ago

 I also used Python 3.12 when the problem occurred, and later solved the problem Double checking all of the basic requirements like Python version, ffmpeg installed or not, and C++ 2022 runtime on the correct OS ------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2024年8月23日(星期五) 上午9:31 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [hacksider/Deep-Live-Cam] pip install -r requirements.txt stop work (Issue #419) C:\Users\16575\Desktop\Deep-Live-Cam-main>python run.py 追溯(最后一次调用): 文件"C:\Users\16575\Desktop\Deep-Live-Cam-main\run.py",第3行,在 从模块导入核心 文件"C:\Users\16575\Desktop\Deep-Live-Cam-main\modules\core.py",第14行,在 进口火炬 模块未找到错误:没有名为“torch”的模块 C:\Users\16575\Desktop\Deep-Live-Cam-main>pip install -r requirements.txt 在索引中查找:https://pypi.org/simple,https://download.pytorch.org/whl/cu118 忽略火炬:标记“sys_platform”=="darwin"与您的环境不匹配 忽略 torchvision:标记'sys_platform == "darwin"'与您的环境不匹配 忽略onnxruntime:标记“sys_platform == “darwin”和platform_machine == “arm64”与您的环境不匹配 忽略on x运行时-silicon:标记“sys_platform==“darwin”和platform_machine==“arm64”不匹配您的环境 忽略tensorflow:标记“sys_platform==“达尔文”与您的环境不匹配 收集 numpy==1.23.5(来自-r requirements.txt(第3行)) 使用缓存的 numpy-1.23.5.tar.gz(10.7 MB) 安装构建依赖项...完成 获取构建轮子的要求... 错误 错误:子进程带错误退出 ×获取构建轮子的要求未成功运行。 ←退出代码:1 〖33行输出〗 追溯(最后一次调用): 文件"C:\Users\16575\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py",第353行,在 主要的 文件"C:\Users\16575\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py",335号线,主线路 json_out['return_val'] = hook(hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件"C:\Users\16575\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py",在get_require_for_building_wheel中,第112行 后端=构建后端 ^^^^^^^^^^^^^^^^ 文件"C:\Users\16575\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py",第77行,在构建后端 obj=导入模块(mod_path) ^^^^^^^^^^^^^^^^^^^^^^^ 文件“C:\Users\16575\AppData\Local\Programs\Python\Python312\Lib\importlib_初始化.皮“,在import_module中的第90行 返回 _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“”,第1387行,在_gcd_import中 文件“”,第1360行,在_find_and_load中 文件“”,第1310行,在_find_and_load_unlocked中 文件“”,第488行,在_call_with_frames_removed中 文件,第1387行,在gcd_导入 文件,第1360行,在查找并加载 文件,第1331行,在查找并加载解锁 文件,第935行,在加载解锁 exec_module中的第994行的文件 文件,第488行,在调用_删除_帧 文件“C:\Users\16575\AppData\Local\Temp\pip-build-env-va64acz\overlay\Lib\site-packages\setuptools_初始化.皮“,第16行,在 导入setuptools.version 文件“C:\Users\16575\AppData\Local\Temp\pip-build-env-va64acz\overlay\Lib\site-packages\setuptools\version.py“,第一行,在 导入pkg_资源 文件“C:\Users\16575\AppData\Local\Temp\pip-build-env-va64acz\overlay\Lib\site-packages\pkg_resources初始化.皮“,第2172行,在 寄存器查找器(pkgutil)。ImpImporter,在路径上找到 ^^^^^^^^^^^^^^^^^^^ 属性错误:模块'pkgutil'没有属性'ImpImporter'。你是说"拉链进口商"吗 【产出结束】 注意:此错误源于子进程,可能不是pip的问题。 错误:子进程带错误退出 ×获取构建轮子的要求未成功运行。 ←退出代码:1 输出见上文。 注意:此错误源于子进程,可能不是pip的问题。 我该怎么弥补 - 直接回复这封邮件,在GitHub上查看,或取消订阅. **@.***>

so how do u solve the problem finally? I have the same issues with u, and python 3.10 works with it? lot thanks.

hacksider commented 1 month ago

The reccomended version is 3.10, it will also work on 3.11 but I can't guarantee for it to work on 3.12

beef-not commented 1 month ago

i fix it latter with conda .just follow the readme and make sure every step.

phpmooc commented 1 month ago

every step is checked many times to be fine, but it still stuck at the point Installing backend dependencies... |, is there any way to know what happened to that long long stuck?

beef-not commented 1 month ago

try to use conda with Python310

phpmooc commented 1 month ago

try to use conda with Python310

yep it works now, tks a lot.