Я попытался загрузить dlib с помощью pip, и вот что у меня вместо этого:
Building wheel for dlib (setup.py) ... error
> ERROR: Command errored out with exit status 1: command: 'c:\program
> files (x86)\python38-32\python.exe' -u -c 'import sys, setuptools,
> tokenize; sys.argv[0] =
> '"'"'C:\\Users\\kiddr\\AppData\\Local\\Temp\\pip-install-6dc0zubd\\dlib\\setup.py'"'"';
> __file__='"'"'C:\\Users\\kiddr\\AppData\\Local\\Temp\\pip-install-6dc0zubd\\dlib\\setup.py'"'"';f=getattr(tokenize,
> '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"',
> '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))'
> bdist_wheel -d 'C:\Users\kiddr\AppData\Local\Temp\pip-wheel-f242luxg'
> cwd: C:\Users\kiddr\AppData\Local\Temp\pip-install-6dc0zubd\dlib\
> Complete output (53 lines): running bdist_wheel running build
> running build_py package init file 'tools\python\dlib\__init__.py'
> not found (or not a regular file) running build_ext Traceback
> (most recent call last):
> File "C:\Users\kiddr\AppData\Local\Temp\pip-install-6dc0zubd\dlib\setup.py",
> line 120, in get_cmake_version
> out = subprocess.check_output(['cmake', '--version'])
> File "c:\program files (x86)\python38-32\lib\subprocess.py", line 411, in check_output
> return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
> File "c:\program files (x86)\python38-32\lib\subprocess.py", line 489, in run
> with Popen(*popenargs, **kwargs) as process:
> File "c:\program files (x86)\python38-32\lib\subprocess.py", line 854, in __init__
> self._execute_child(args, executable, preexec_fn, close_fds,
> File "c:\program files (x86)\python38-32\lib\subprocess.py", line 1307, 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:\Users\kiddr\AppData\Local\Temp\pip-install-6dc0zubd\dlib\setup.py", line 223, in <module>
setup(
File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "c:\program files (x86)\python38-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\program files (x86)\python38-32\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\program files (x86)\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\kiddr\AppData\Roaming\Python\Python38\site-packages\wheel\bdist_wheel.py", line 290, in run
self.run_command('build')
File "c:\program files (x86)\python38-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\program files (x86)\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\program files (x86)\python38-32\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\program files (x86)\python38-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\program files (x86)\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\kiddr\AppData\Local\Temp\pip-install-6dc0zubd\dlib\setup.py", line 129, in run
cmake_version = self.get_cmake_version()
File "C:\Users\kiddr\AppData\Local\Temp\pip-install-6dc0zubd\dlib\setup.py", line 122, in get_cmake_version
raise RuntimeError("\n*******************************************************************\n" +
RuntimeError:
*******************************************************************
CMake must be installed to build the following extensions: _dlib_pybind11
*******************************************************************
----------------------------------------
ERROR: Failed building wheel for dlib
Что странно, потому что я установил CMake и даже перезапустил свой компьютер. Я также добавил путь к пакетам сайтов в свою среду PATH. Я также уже убедился, что pip был обновлен до последней версии, и попытался вручную загрузить zip-версию с github и установить ее, распаковав файл и запустив setup.py от имени администратора. Однако я столкнулся с тем же кодом ошибки.
Кто-нибудь может помочь, пожалуйста? Огромное спасибо заранее!