在安装面部识别lib时遇到错误

发布于 2025-02-05 08:43:09 字数 16085 浏览 4 评论 0原文

在此处输入代码我还安装了vs代码,我已经从github站点克隆了面部识别库,但是在执行python setup.py安装时,我在cmakelist.txt.txt:5(消息) :另一个是。提高呼叫Processerror(RET代码,CMD),这是 错误创建构建\ bdist.win-amd64 \ egg \ egg-info 复制face_recognition.egg-info \ pkg-info->构建\ bdist.win-amd64 \ egg \ egg-info

copying face_recognition.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-I
NFO
copying face_recognition.egg-info\dependency_links.txt -> build\bdist.win-amd64\
egg\EGG-INFO
copying face_recognition.egg-info\entry_points.txt -> build\bdist.win-amd64\egg\
EGG-INFO
copying face_recognition.egg-info\not-zip-safe -> build\bdist.win-amd64\egg\EGG-
INFO
copying face_recognition.egg-info\requires.txt -> build\bdist.win-amd64\egg\EGG-
INFO
copying face_recognition.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG
-INFO
creating dist
creating 'dist\face_recognition-1.4.0-py3.10.egg' and adding 'build\bdist.win-am
d64\egg' to it
removing 'build\bdist.win-amd64\egg' (and everything under it)
Processing face_recognition-1.4.0-py3.10.egg
removing 'c:\users\tohid.dell\appdata\local\programs\python\python310\lib\site-p
ackages\face_recognition-1.4.0-py3.10.egg' (and everything under it)
creating c:\users\tohid.dell\appdata\local\programs\python\python310\lib\site-pa
ckages\face_recognition-1.4.0-py3.10.egg
Extracting face_recognition-1.4.0-py3.10.egg to c:\users\tohid.dell\appdata\loca
l\programs\python\python310\lib\site-packages
face-recognition 1.4.0 is already the active version in easy-install.pth
Installing face_detection-script.py script to C:\Users\tohid.Dell\AppData\Local\
Programs\Python\Python310\Scripts
Installing face_detection.exe script to C:\Users\tohid.Dell\AppData\Local\Progra
ms\Python\Python310\Scripts
Installing face_recognition-script.py script to C:\Users\tohid.Dell\AppData\Loca
l\Programs\Python\Python310\Scripts
Installing face_recognition.exe script to C:\Users\tohid.Dell\AppData\Local\Prog
rams\Python\Python310\Scripts

Installed c:\users\tohid.dell\appdata\local\programs\python\python310\lib\site-p
ackages\face_recognition-1.4.0-py3.10.egg
Processing dependencies for face-recognition==1.4.0
Searching for dlib>=19.7
Reading https://pypi.org/simple/dlib/
Downloading https://files.pythonhosted.org/packages/e5/3b/7a8522a5c2ef6ff6252e46
b0788b3d2c2280198c49d6ecf3b576b171045f/dlib-19.24.0.tar.gz#sha256=24f3009158e0d9
2386ee0c0c1317a37bab7b5ba846d444194c61ffa0964f986f
Best match: dlib 19.24.0
Processing dlib-19.24.0.tar.gz
Writing C:\Users\tohid.Dell\AppData\Local\Temp\easy_install-vdsvdyyk\dlib-19.24.
0\setup.cfg
Running dlib-19.24.0\setup.py -q bdist_egg --dist-dir C:\Users\tohid.Dell\AppDat
a\Local\Temp\easy_install-vdsvdyyk\dlib-19.24.0\egg-dist-tmp-3ni5jy_0
package init file 'tools\python\dlib\__init__.py' not found (or not a regular fi
le)
no previously-included directories found matching 'tools\python\build*'
no previously-included directories found matching 'dlib\cmake_utils\*\build*'
no previously-included directories found matching 'dlib\test'
warning: no previously-included files matching '*.pyc' found anywhere in distrib
ution
Building extension for Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:4
1) [MSC v.1929 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\tohid.Dell\AppData\Local\Temp\easy_install
-vdsvdyyk\dlib-19.24.0\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\to
hid.Dell\AppData\Local\Temp\easy_install-vdsvdyyk\dlib-19.24.0\build\lib.win-amd
64-3.10 -DPYTHON_EXECUTABLE=C:\Users\tohid.Dell\AppData\Local\Programs\Python\Py
thon310\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\tohid.Dell\
AppData\Local\Temp\easy_install-vdsvdyyk\dlib-19.24.0\build\lib.win-amd64-3.10 -
A x64'
-- Building for: NMake Makefiles
CMake Error at CMakeLists.txt:5 (message):



  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!


  You must use Visual Studio to build a python extension on windows.  If you
  are getting this error it means you have not installed Visual C++.  Note
  that there are many flavors of Visual Studio, like Visual Studio for C#
  development.  You need to install Visual Studio for C++.


  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!




-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\sandbox.py", line 156, in save_modules
    yield saved
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\sandbox.py", line 198, in setup_context
    yield
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\sandbox.py", line 259, in run_setup
    _execfile(setup_script, ns)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\sandbox.py", line 46, in _execfile
    exec(code, globals, locals)
  File "C:\Users\tohid.Dell\AppData\Local\Temp\easy_install-vdsvdyyk\dlib-19.24.
0\setup.py", line 222, in <module>
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\bdist_egg.py", line 164, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\bdist_egg.py", line 150, in call_command
    self.run_command(cmdname)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\install_lib.py", line 11, in run
    self.build()
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\command\install_lib.py", line 107, in build
    self.run_command('build_ext')
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\tohid.Dell\AppData\Local\Temp\easy_install-vdsvdyyk\dlib-19.24.
0\setup.py", line 134, in run
  File "C:\Users\tohid.Dell\AppData\Local\Temp\easy_install-vdsvdyyk\dlib-19.24.
0\setup.py", line 171, in build_extension
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\subproce
ss.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\tohid.Dell\\AppDat
a\\Local\\Temp\\easy_install-vdsvdyyk\\dlib-19.24.0\\tools\\python', '-DCMAKE_LI
BRARY_OUTPUT_DIRECTORY=C:\\Users\\tohid.Dell\\AppData\\Local\\Temp\\easy_install
-vdsvdyyk\\dlib-19.24.0\\build\\lib.win-amd64-3.10', '-DPYTHON_EXECUTABLE=C:\\Us
ers\\tohid.Dell\\AppData\\Local\\Programs\\Python\\Python310\\python.exe', '-DCM
AKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\tohid.Dell\\AppData\\Local\\Temp
\\easy_install-vdsvdyyk\\dlib-19.24.0\\build\\lib.win-amd64-3.10', '-A', 'x64']'
 returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\tohid.Dell\Documents\face_test\face_recognition\setup.py", line
 25, in <module>
    setup(
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\install.py", line 67, in run
    self.do_egg_install()
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\install.py", line 117, in do_egg_install
    cmd.run(show_deprecation=False)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\easy_install.py", line 408, in run
    self.easy_install(spec, not self.no_deps)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\easy_install.py", line 650, in easy_install
    return self.install_item(None, spec, tmpdir, deps, True)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\easy_install.py", line 697, in install_item
    self.process_distribution(spec, dist, deps)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\easy_install.py", line 744, in process_distribution
    distros = WorkingSet([]).resolve(
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\pkg_resources\__init__.py", line 766, in resolve
    dist = best[req.key] = env.best_match(
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\pkg_resources\__init__.py", line 1051, in best_match
    return self.obtain(req, installer)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\pkg_resources\__init__.py", line 1063, in obtain
    return installer(requirement)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\easy_install.py", line 669, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\easy_install.py", line 695, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\easy_install.py", line 890, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\easy_install.py", line 1162, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\easy_install.py", line 1146, in run_setup
    run_setup(setup_script, args)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\sandbox.py", line 249, in run_setup
    with setup_context(setup_dir):
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\contextl
ib.py", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\sandbox.py", line 190, in setup_context
    with save_modules():
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\contextl
ib.py", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\sandbox.py", line 169, in save_modules
    saved_exc.resume()
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\sandbox.py", line 143, in resume
    raise exc.with_traceback(self._tb)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\sandbox.py", line 156, in save_modules
    yield saved
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\sandbox.py", line 198, in setup_context
    yield
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\sandbox.py", line 259, in run_setup
    _execfile(setup_script, ns)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\sandbox.py", line 46, in _execfile
    exec(code, globals, locals)
  File "C:\Users\tohid.Dell\AppData\Local\Temp\easy_install-vdsvdyyk\dlib-19.24.
0\setup.py", line 222, in <module>
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\bdist_egg.py", line 164, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\bdist_egg.py", line 150, in call_command
    self.run_command(cmdname)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\install_lib.py", line 11, in run
    self.build()
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\command\install_lib.py", line 107, in build
    self.run_command('build_ext')
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\tohid.Dell\AppData\Local\Temp\easy_install-vdsvdyyk\dlib-19.24.
0\setup.py", line 134, in run
  File "C:\Users\tohid.Dell\AppData\Local\Temp\easy_install-vdsvdyyk\dlib-19.24.
0\setup.py", line 171, in build_extension
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\subproce
ss.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\tohid.Dell\\AppDat
a\\Local\\Temp\\easy_install-vdsvdyyk\\dlib-19.24.0\\tools\\python', '-DCMAKE_LI
BRARY_OUTPUT_DIRECTORY=C:\\Users\\tohid.Dell\\AppData\\Local\\Temp\\easy_install
-vdsvdyyk\\dlib-19.24.0\\build\\lib.win-amd64-3.10', '-DPYTHON_EXECUTABLE=C:\\Us
ers\\tohid.Dell\\AppData\\Local\\Programs\\Python\\Python310\\python.exe', '-DCM
AKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\tohid.Dell\\AppData\\Local\\Temp
\\easy_install-vdsvdyyk\\dlib-19.24.0\\build\\lib.win-amd64-3.10', '-A', 'x64']'
 returned non-zero exit status 1.

C:\Users\tohid.Dell\Documents\face_test\face_recognition>

enter code hereI have vs code also installed cmake I have cloned face recognition library from GitHub site but in while doing python setup.py install I'm getting cmake error at cmakelist.txt:5(message) :and another one is. raise calledprocesserror(ret code, cmd) here is the
errorcreating build\bdist.win-amd64\egg\EGG-INFO
copying face_recognition.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO

copying face_recognition.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-I
NFO
copying face_recognition.egg-info\dependency_links.txt -> build\bdist.win-amd64\
egg\EGG-INFO
copying face_recognition.egg-info\entry_points.txt -> build\bdist.win-amd64\egg\
EGG-INFO
copying face_recognition.egg-info\not-zip-safe -> build\bdist.win-amd64\egg\EGG-
INFO
copying face_recognition.egg-info\requires.txt -> build\bdist.win-amd64\egg\EGG-
INFO
copying face_recognition.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG
-INFO
creating dist
creating 'dist\face_recognition-1.4.0-py3.10.egg' and adding 'build\bdist.win-am
d64\egg' to it
removing 'build\bdist.win-amd64\egg' (and everything under it)
Processing face_recognition-1.4.0-py3.10.egg
removing 'c:\users\tohid.dell\appdata\local\programs\python\python310\lib\site-p
ackages\face_recognition-1.4.0-py3.10.egg' (and everything under it)
creating c:\users\tohid.dell\appdata\local\programs\python\python310\lib\site-pa
ckages\face_recognition-1.4.0-py3.10.egg
Extracting face_recognition-1.4.0-py3.10.egg to c:\users\tohid.dell\appdata\loca
l\programs\python\python310\lib\site-packages
face-recognition 1.4.0 is already the active version in easy-install.pth
Installing face_detection-script.py script to C:\Users\tohid.Dell\AppData\Local\
Programs\Python\Python310\Scripts
Installing face_detection.exe script to C:\Users\tohid.Dell\AppData\Local\Progra
ms\Python\Python310\Scripts
Installing face_recognition-script.py script to C:\Users\tohid.Dell\AppData\Loca
l\Programs\Python\Python310\Scripts
Installing face_recognition.exe script to C:\Users\tohid.Dell\AppData\Local\Prog
rams\Python\Python310\Scripts

Installed c:\users\tohid.dell\appdata\local\programs\python\python310\lib\site-p
ackages\face_recognition-1.4.0-py3.10.egg
Processing dependencies for face-recognition==1.4.0
Searching for dlib>=19.7
Reading https://pypi.org/simple/dlib/
Downloading https://files.pythonhosted.org/packages/e5/3b/7a8522a5c2ef6ff6252e46
b0788b3d2c2280198c49d6ecf3b576b171045f/dlib-19.24.0.tar.gz#sha256=24f3009158e0d9
2386ee0c0c1317a37bab7b5ba846d444194c61ffa0964f986f
Best match: dlib 19.24.0
Processing dlib-19.24.0.tar.gz
Writing C:\Users\tohid.Dell\AppData\Local\Temp\easy_install-vdsvdyyk\dlib-19.24.
0\setup.cfg
Running dlib-19.24.0\setup.py -q bdist_egg --dist-dir C:\Users\tohid.Dell\AppDat
a\Local\Temp\easy_install-vdsvdyyk\dlib-19.24.0\egg-dist-tmp-3ni5jy_0
package init file 'tools\python\dlib\__init__.py' not found (or not a regular fi
le)
no previously-included directories found matching 'tools\python\build*'
no previously-included directories found matching 'dlib\cmake_utils\*\build*'
no previously-included directories found matching 'dlib\test'
warning: no previously-included files matching '*.pyc' found anywhere in distrib
ution
Building extension for Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:4
1) [MSC v.1929 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\tohid.Dell\AppData\Local\Temp\easy_install
-vdsvdyyk\dlib-19.24.0\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\to
hid.Dell\AppData\Local\Temp\easy_install-vdsvdyyk\dlib-19.24.0\build\lib.win-amd
64-3.10 -DPYTHON_EXECUTABLE=C:\Users\tohid.Dell\AppData\Local\Programs\Python\Py
thon310\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\tohid.Dell\
AppData\Local\Temp\easy_install-vdsvdyyk\dlib-19.24.0\build\lib.win-amd64-3.10 -
A x64'
-- Building for: NMake Makefiles
CMake Error at CMakeLists.txt:5 (message):



  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!


  You must use Visual Studio to build a python extension on windows.  If you
  are getting this error it means you have not installed Visual C++.  Note
  that there are many flavors of Visual Studio, like Visual Studio for C#
  development.  You need to install Visual Studio for C++.


  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!




-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\sandbox.py", line 156, in save_modules
    yield saved
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\sandbox.py", line 198, in setup_context
    yield
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\sandbox.py", line 259, in run_setup
    _execfile(setup_script, ns)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\sandbox.py", line 46, in _execfile
    exec(code, globals, locals)
  File "C:\Users\tohid.Dell\AppData\Local\Temp\easy_install-vdsvdyyk\dlib-19.24.
0\setup.py", line 222, in <module>
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\bdist_egg.py", line 164, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\bdist_egg.py", line 150, in call_command
    self.run_command(cmdname)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\install_lib.py", line 11, in run
    self.build()
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\command\install_lib.py", line 107, in build
    self.run_command('build_ext')
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\tohid.Dell\AppData\Local\Temp\easy_install-vdsvdyyk\dlib-19.24.
0\setup.py", line 134, in run
  File "C:\Users\tohid.Dell\AppData\Local\Temp\easy_install-vdsvdyyk\dlib-19.24.
0\setup.py", line 171, in build_extension
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\subproce
ss.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\tohid.Dell\\AppDat
a\\Local\\Temp\\easy_install-vdsvdyyk\\dlib-19.24.0\\tools\\python', '-DCMAKE_LI
BRARY_OUTPUT_DIRECTORY=C:\\Users\\tohid.Dell\\AppData\\Local\\Temp\\easy_install
-vdsvdyyk\\dlib-19.24.0\\build\\lib.win-amd64-3.10', '-DPYTHON_EXECUTABLE=C:\\Us
ers\\tohid.Dell\\AppData\\Local\\Programs\\Python\\Python310\\python.exe', '-DCM
AKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\tohid.Dell\\AppData\\Local\\Temp
\\easy_install-vdsvdyyk\\dlib-19.24.0\\build\\lib.win-amd64-3.10', '-A', 'x64']'
 returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\tohid.Dell\Documents\face_test\face_recognition\setup.py", line
 25, in <module>
    setup(
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\install.py", line 67, in run
    self.do_egg_install()
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\install.py", line 117, in do_egg_install
    cmd.run(show_deprecation=False)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\easy_install.py", line 408, in run
    self.easy_install(spec, not self.no_deps)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\easy_install.py", line 650, in easy_install
    return self.install_item(None, spec, tmpdir, deps, True)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\easy_install.py", line 697, in install_item
    self.process_distribution(spec, dist, deps)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\easy_install.py", line 744, in process_distribution
    distros = WorkingSet([]).resolve(
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\pkg_resources\__init__.py", line 766, in resolve
    dist = best[req.key] = env.best_match(
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\pkg_resources\__init__.py", line 1051, in best_match
    return self.obtain(req, installer)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\pkg_resources\__init__.py", line 1063, in obtain
    return installer(requirement)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\easy_install.py", line 669, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\easy_install.py", line 695, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\easy_install.py", line 890, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\easy_install.py", line 1162, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\easy_install.py", line 1146, in run_setup
    run_setup(setup_script, args)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\sandbox.py", line 249, in run_setup
    with setup_context(setup_dir):
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\contextl
ib.py", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\sandbox.py", line 190, in setup_context
    with save_modules():
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\contextl
ib.py", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\sandbox.py", line 169, in save_modules
    saved_exc.resume()
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\sandbox.py", line 143, in resume
    raise exc.with_traceback(self._tb)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\sandbox.py", line 156, in save_modules
    yield saved
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\sandbox.py", line 198, in setup_context
    yield
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\sandbox.py", line 259, in run_setup
    _execfile(setup_script, ns)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\sandbox.py", line 46, in _execfile
    exec(code, globals, locals)
  File "C:\Users\tohid.Dell\AppData\Local\Temp\easy_install-vdsvdyyk\dlib-19.24.
0\setup.py", line 222, in <module>
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\bdist_egg.py", line 164, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\bdist_egg.py", line 150, in call_command
    self.run_command(cmdname)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\site-pac
kages\setuptools\command\install_lib.py", line 11, in run
    self.build()
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\command\install_lib.py", line 107, in build
    self.run_command('build_ext')
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\distutil
s\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\tohid.Dell\AppData\Local\Temp\easy_install-vdsvdyyk\dlib-19.24.
0\setup.py", line 134, in run
  File "C:\Users\tohid.Dell\AppData\Local\Temp\easy_install-vdsvdyyk\dlib-19.24.
0\setup.py", line 171, in build_extension
  File "C:\Users\tohid.Dell\AppData\Local\Programs\Python\Python310\lib\subproce
ss.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\tohid.Dell\\AppDat
a\\Local\\Temp\\easy_install-vdsvdyyk\\dlib-19.24.0\\tools\\python', '-DCMAKE_LI
BRARY_OUTPUT_DIRECTORY=C:\\Users\\tohid.Dell\\AppData\\Local\\Temp\\easy_install
-vdsvdyyk\\dlib-19.24.0\\build\\lib.win-amd64-3.10', '-DPYTHON_EXECUTABLE=C:\\Us
ers\\tohid.Dell\\AppData\\Local\\Programs\\Python\\Python310\\python.exe', '-DCM
AKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\tohid.Dell\\AppData\\Local\\Temp
\\easy_install-vdsvdyyk\\dlib-19.24.0\\build\\lib.win-amd64-3.10', '-A', 'x64']'
 returned non-zero exit status 1.

C:\Users\tohid.Dell\Documents\face_test\face_recognition>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文