dlib错误时安装Deepfake工具包



我正在尝试安装Deepfake工具包,但是很少出现错误。我更新了pip,并尝试手动安装cmake,并成功了。但是仍然不知道是什么阻止了dlib的安装。

这是conda env create -f envs/environment-gpu.yaml

的结果
(base) c:UsersHussainDesktopdot-maindot-main>conda env create -f envs/environment-gpu.yaml
Collecting package metadata (repodata.json): done
Solving environment: done
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Installing pip dependencies: - Ran pip subprocess with arguments:
['C:\Users\Hussain\miniconda3\envs\dot\python.exe', '-m', 'pip', 'install', '-U', '-r', 'c:\Users\Hussain\Desktop\dot-main\dot-main\envs\condaenv.mbp0h_z_.requirements.txt']
Pip subprocess output:
Collecting llvmlite==0.36.0
Using cached llvmlite-0.36.0-cp38-cp38-win_amd64.whl (16.0 MB)
Collecting onnxruntime-gpu==1.9.0
Using cached onnxruntime_gpu-1.9.0-cp38-cp38-win_amd64.whl (95.8 MB)
Collecting click==8.0.2
Using cached click-8.0.2-py3-none-any.whl (97 kB)
Collecting dlib==19.19.0
Using cached dlib-19.19.0.tar.gz (3.2 MB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting face_alignment==1.3.3
Using cached face_alignment-1.3.3-py2.py3-none-any.whl
Collecting numpy==1.22.0
Using cached numpy-1.22.0-cp38-cp38-win_amd64.whl (14.7 MB)
Collecting opencv_python==4.5.5.62
Using cached opencv_python-4.5.5.62-cp36-abi3-win_amd64.whl (35.4 MB)
Collecting opencv-contrib-python==4.5.5.62
Using cached opencv_contrib_python-4.5.5.62-cp36-abi3-win_amd64.whl (42.2 MB)
Collecting Pillow==9.1.1
Using cached Pillow-9.1.1-cp38-cp38-win_amd64.whl (3.3 MB)
Collecting PyYAML==5.4.1
Using cached PyYAML-5.4.1-cp38-cp38-win_amd64.whl (213 kB)
Collecting requests==2.25.1
Using cached requests-2.25.1-py2.py3-none-any.whl (61 kB)
Collecting scikit_image==0.19.1
Using cached scikit_image-0.19.1-cp38-cp38-win_amd64.whl (12.5 MB)
Collecting scipy==1.7.0
Using cached scipy-1.7.0-cp38-cp38-win_amd64.whl (33.7 MB)
Collecting mediapipe==0.8.9
Using cached mediapipe-0.8.9-cp38-cp38-win_amd64.whl (48.6 MB)
Collecting protobuf==3.20.1
Using cached protobuf-3.20.1-cp38-cp38-win_amd64.whl (904 kB)
Collecting flatbuffers
Using cached flatbuffers-2.0-py2.py3-none-any.whl (26 kB)
Collecting colorama
Using cached colorama-0.4.5-py2.py3-none-any.whl (16 kB)
Collecting tqdm
Using cached tqdm-4.64.0-py2.py3-none-any.whl (78 kB)
Collecting torch
Using cached torch-1.12.0-cp38-cp38-win_amd64.whl (161.9 MB)
Collecting numba
Using cached numba-0.55.2-cp38-cp38-win_amd64.whl (2.4 MB)
Collecting idna<3,>=2.5
Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting chardet<5,>=3.0.2
Using cached chardet-4.0.0-py2.py3-none-any.whl (178 kB)
Collecting urllib3<1.27,>=1.21.1
Using cached urllib3-1.26.9-py2.py3-none-any.whl (138 kB)
Collecting certifi>=2017.4.17
Using cached certifi-2022.6.15-py3-none-any.whl (160 kB)
Collecting networkx>=2.2
Using cached networkx-2.8.4-py3-none-any.whl (2.0 MB)
Collecting tifffile>=2019.7.26
Using cached tifffile-2022.5.4-py3-none-any.whl (195 kB)
Collecting packaging>=20.0
Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting PyWavelets>=1.1.1
Using cached PyWavelets-1.3.0-cp38-cp38-win_amd64.whl (4.2 MB)
Collecting imageio>=2.4.1
Using cached imageio-2.19.3-py3-none-any.whl (3.4 MB)
Collecting absl-py
Using cached absl_py-1.1.0-py3-none-any.whl (123 kB)
Collecting matplotlib
Using cached matplotlib-3.5.2-cp38-cp38-win_amd64.whl (7.2 MB)
Collecting attrs>=19.1.0
Using cached attrs-21.4.0-py2.py3-none-any.whl (60 kB)
Collecting six
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Requirement already satisfied: wheel in c:usershussainminiconda3envsdotlibsite-packages (from mediapipe==0.8.9->-r c:UsersHussainDesktopdot-maindot-mainenvs../requirements.txt (line 12)) (0.37.1)
Collecting pyparsing!=3.0.5,>=2.0.2
Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Collecting fonttools>=4.22.0
Using cached fonttools-4.33.3-py3-none-any.whl (930 kB)
Collecting cycler>=0.10
Using cached cycler-0.11.0-py3-none-any.whl (6.4 kB)
Collecting kiwisolver>=1.0.1
Using cached kiwisolver-1.4.3-cp38-cp38-win_amd64.whl (55 kB)
Collecting python-dateutil>=2.7
Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Requirement already satisfied: setuptools in c:usershussainminiconda3envsdotlibsite-packages (from numba->face_alignment==1.3.3->-r c:UsersHussainDesktopdot-maindot-mainenvs../requirements.txt (line 3)) (62.6.0)
Collecting numba
Using cached numba-0.55.1-cp38-cp38-win_amd64.whl (2.4 MB)
Using cached numba-0.55.0-cp38-cp38-win_amd64.whl (2.4 MB)
Using cached numba-0.54.1-cp38-cp38-win_amd64.whl (2.3 MB)
Using cached numba-0.54.0-cp38-cp38-win_amd64.whl (2.3 MB)
Using cached numba-0.53.1-cp38-cp38-win_amd64.whl (2.3 MB)
Collecting typing-extensions
Using cached typing_extensions-4.2.0-py3-none-any.whl (24 kB)
Building wheels for collected packages: dlib
Building wheel for dlib (setup.py): started
Building wheel for dlib (setup.py): finished with status 'error'
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: six, pyparsing, Pillow, numpy, typing-extensions, tifffile, scipy, PyWavelets, python-dateutil, packaging, networkx, llvmlite, kiwisolver, imageio, fonttools, cycler, colorama, urllib3, tqdm, torch, scikit-image, protobuf, opencv-python, opencv-contrib-python, numba, matplotlib, idna, flatbuffers, chardet, certifi, attrs, absl-py, requests, PyYAML, onnxruntime-gpu, mediapipe, face-alignment, dlib, click
Running setup.py install for dlib: started
Running setup.py install for dlib: finished with status 'error'
Pip subprocess error:
ERROR: Command errored out with exit status 1:
command: 'C:UsersHussainminiconda3envsdotpython.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Hussain\AppData\Local\Temp\pip-install-1ob4ee6t\dlib_1ca518dfc7734580bd97f366b65e18a9\setup.py'"'"'; __file__='"'"'C:\Users\Hussain\AppData\Local\Temp\pip-install-1ob4ee6t\dlib_1ca518dfc7734580bd97f366b65e18a9\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:UsersHussainAppDataLocalTemppip-wheel-r08o6d59'
cwd: C:UsersHussainAppDataLocalTemppip-install-1ob4ee6tdlib_1ca518dfc7734580bd97f366b65e18a9
Complete output (63 lines):
running bdist_wheel
running build
running build_py
package init file 'dlib__init__.py' not found (or not a regular file)
running build_ext
Traceback (most recent call last):
File "C:UsersHussainAppDataLocalTemppip-install-1ob4ee6tdlib_1ca518dfc7734580bd97f366b65e18a9setup.py", line 120, in get_cmake_version
out = subprocess.check_output(['cmake', '--version'])
File "C:UsersHussainminiconda3envsdotlibsubprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:UsersHussainminiconda3envsdotlibsubprocess.py", line 493, in run
with Popen(*popenargs, **kwargs) as process:
File "C:UsersHussainminiconda3envsdotlibsubprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:UsersHussainminiconda3envsdotlibsubprocess.py", line 1311, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:UsersHussainAppDataLocalTemppip-install-1ob4ee6tdlib_1ca518dfc7734580bd97f366b65e18a9setup.py", line 223, in <module>
setup(
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptools__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptools_distutilscore.py", line 177, in setup
return run_commands(dist)
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptools_distutilscore.py", line 193, in run_commands
dist.run_commands()
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptools_distutilsdist.py", line 968, in run_commands
self.run_command(cmd)
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptoolsdist.py", line 1229, in run_command
super().run_command(command)
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptools_distutilsdist.py", line 987, in run_command
cmd_obj.run()
File "C:UsersHussainminiconda3envsdotlibsite-packageswheelbdist_wheel.py", line 299, in run
self.run_command('build')
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptools_distutilscmd.py", line 317, in run_command
self.distribution.run_command(command)
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptoolsdist.py", line 1229, in run_command
super().run_command(command)
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptools_distutilsdist.py", line 987, in run_command
cmd_obj.run()
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptoolscommandbuild.py", line 24, in run
super().run()
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptools_distutilscommandbuild.py", line 131, in run
self.run_command(cmd_name)
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptools_distutilscmd.py", line 317, in run_command
self.distribution.run_command(command)
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptoolsdist.py", line 1229, in run_command
super().run_command(command)
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptools_distutilsdist.py", line 987, in run_command
cmd_obj.run()
File "C:UsersHussainAppDataLocalTemppip-install-1ob4ee6tdlib_1ca518dfc7734580bd97f366b65e18a9setup.py", line 129, in run
cmake_version = self.get_cmake_version()
File "C:UsersHussainAppDataLocalTemppip-install-1ob4ee6tdlib_1ca518dfc7734580bd97f366b65e18a9setup.py", line 122, in get_cmake_version
raise RuntimeError("n*******************************************************************n" +
RuntimeError:
*******************************************************************
CMake must be installed to build the following extensions: dlib
*******************************************************************
----------------------------------------
ERROR: Failed building wheel for dlib
ERROR: Command errored out with exit status 1:
command: 'C:UsersHussainminiconda3envsdotpython.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Hussain\AppData\Local\Temp\pip-install-1ob4ee6t\dlib_1ca518dfc7734580bd97f366b65e18a9\setup.py'"'"'; __file__='"'"'C:\Users\Hussain\AppData\Local\Temp\pip-install-1ob4ee6t\dlib_1ca518dfc7734580bd97f366b65e18a9\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersHussainAppDataLocalTemppip-record-gmt2l0h_install-record.txt' --single-version-externally-managed --compile --install-headers 'C:UsersHussainminiconda3envsdotIncludedlib'
cwd: C:UsersHussainAppDataLocalTemppip-install-1ob4ee6tdlib_1ca518dfc7734580bd97f366b65e18a9
Complete output (67 lines):
running install
C:UsersHussainminiconda3envsdotlibsite-packagessetuptoolscommandinstall.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
package init file 'dlib__init__.py' not found (or not a regular file)
running build_ext
Traceback (most recent call last):
File "C:UsersHussainAppDataLocalTemppip-install-1ob4ee6tdlib_1ca518dfc7734580bd97f366b65e18a9setup.py", line 120, in get_cmake_version
out = subprocess.check_output(['cmake', '--version'])
File "C:UsersHussainminiconda3envsdotlibsubprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:UsersHussainminiconda3envsdotlibsubprocess.py", line 493, in run
with Popen(*popenargs, **kwargs) as process:
File "C:UsersHussainminiconda3envsdotlibsubprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:UsersHussainminiconda3envsdotlibsubprocess.py", line 1311, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:UsersHussainAppDataLocalTemppip-install-1ob4ee6tdlib_1ca518dfc7734580bd97f366b65e18a9setup.py", line 223, in <module>
setup(
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptools__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptools_distutilscore.py", line 177, in setup
return run_commands(dist)
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptools_distutilscore.py", line 193, in run_commands
dist.run_commands()
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptools_distutilsdist.py", line 968, in run_commands
self.run_command(cmd)
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptoolsdist.py", line 1229, in run_command
super().run_command(command)
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptools_distutilsdist.py", line 987, in run_command
cmd_obj.run()
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptoolscommandinstall.py", line 68, in run
return orig.install.run(self)
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptools_distutilscommandinstall.py", line 690, in run
self.run_command('build')
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptools_distutilscmd.py", line 317, in run_command
self.distribution.run_command(command)
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptoolsdist.py", line 1229, in run_command
super().run_command(command)
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptools_distutilsdist.py", line 987, in run_command
cmd_obj.run()
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptoolscommandbuild.py", line 24, in run
super().run()
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptools_distutilscommandbuild.py", line 131, in run
self.run_command(cmd_name)
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptools_distutilscmd.py", line 317, in run_command
self.distribution.run_command(command)
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptoolsdist.py", line 1229, in run_command
super().run_command(command)
File "C:UsersHussainminiconda3envsdotlibsite-packagessetuptools_distutilsdist.py", line 987, in run_command
cmd_obj.run()
File "C:UsersHussainAppDataLocalTemppip-install-1ob4ee6tdlib_1ca518dfc7734580bd97f366b65e18a9setup.py", line 129, in run
cmake_version = self.get_cmake_version()
File "C:UsersHussainAppDataLocalTemppip-install-1ob4ee6tdlib_1ca518dfc7734580bd97f366b65e18a9setup.py", line 122, in get_cmake_version
raise RuntimeError("n*******************************************************************n" +
RuntimeError:
*******************************************************************
CMake must be installed to build the following extensions: dlib
*******************************************************************
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:UsersHussainminiconda3envsdotpython.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Hussain\AppData\Local\Temp\pip-install-1ob4ee6t\dlib_1ca518dfc7734580bd97f366b65e18a9\setup.py'"'"'; __file__='"'"'C:\Users\Hussain\AppData\Local\Temp\pip-install-1ob4ee6t\dlib_1ca518dfc7734580bd97f366b65e18a9\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersHussainAppDataLocalTemppip-record-gmt2l0h_install-record.txt' --single-version-externally-managed --compile --install-headers 'C:UsersHussainminiconda3envsdotIncludedlib' Check the logs for full command output.
failed
CondaEnvException: Pip failed

您必须先安装cmake,详见https://cmake.org/download/

相关内容

  • 没有找到相关文章