简体   繁体   English

我的项目中没有安装 face_recognition 显示这些类型的错误|?

[英]face_recognition is not install in my project Showing these types of error|?

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x039F75F0>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/face-recognition/
  WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x039F7BF0>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/face-recognition/
  WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x039F7230>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/face-recognition/
  WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x039F7BB0>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/face-recognition/
  WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x039F7D50>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed')': /simple/face-recognition/
  Using cached https://files.pythonhosted.org/packages/3f/ed/ad9a28042f373d4633fc8b49109b623597d6f193d3bbbef7780a5ee8eef2/face_recognition-1.2.3-py2.py3-none-any.whl
Collecting dlib>=19.7 (from face_recognition)
  Using cached https://files.pythonhosted.org/packages/1e/62/aacb236d21fbd08148b1d517d58a9d80ea31bdcd386d26f21f8b23b1eb28/dlib-19.18.0.tar.gz
Requirement already satisfied: Click>=6.0 in c:\users\lenovo\appdata\local\programs\python\python37-32\lib\site-packages (from face_recognition) (7.0)
Requirement already satisfied: Pillow in c:\users\lenovo\appdata\local\programs\python\python37-32\lib\site-packages (from face_recognition) (6.2.0)
Requirement already satisfied: face-recognition-models>=0.3.0 in c:\users\lenovo\appdata\local\programs\python\python37-32\lib\site-packages (from face_recognition) (0.3.0)
Requirement already satisfied: numpy in c:\users\lenovo\appdata\local\programs\python\python37-32\lib\site-packages (from face_recognition) (1.17.2)
Installing collected packages: dlib, face-recognition
  Running setup.py install for dlib ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\lenovo\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\LENOVO\\AppData\\Local\\Temp\\pip-install-cvlc63h8\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\LENOVO\\AppData\\Local\\Temp\\pip-install-cvlc63h8\\dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\LENOVO\AppData\Local\Temp\pip-record-ucbq1ylw\install-record.txt' --single-version-externally-managed --compile
         cwd: C:\Users\LENOVO\AppData\Local\Temp\pip-install-cvlc63h8\dlib\
    Complete output (55 lines):
    running install
    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:\Users\LENOVO\AppData\Local\Temp\pip-install-cvlc63h8\dlib\setup.py", line 120, in get_cmake_version
        out = subprocess.check_output(['cmake', '--version'])
      File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\subprocess.py", line 395, in check_output
        **kwargs).stdout
      File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\subprocess.py", line 472, in run
        with Popen(*popenargs, **kwargs) as process:
      File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\subprocess.py", line 775, in __init__
        restore_signals, start_new_session)
      File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\subprocess.py", line 1178, in _execute_child
        startupinfo)
    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\LENOVO\AppData\Local\Temp\pip-install-cvlc63h8\dlib\setup.py", line 261, in <module>
        'Topic :: Software Development',
      File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\command\install.py", line 61, in run
        return orig.install.run(self)
      File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\distutils\command\install.py", line 545, in run
        self.run_command('build')
      File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\distutils\command\build.py", line 135, in run
        self.run_command(cmd_name)
      File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "c:\users\lenovo\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\LENOVO\AppData\Local\Temp\pip-install-cvlc63h8\dlib\setup.py", line 129, in run
        cmake_version = self.get_cmake_version()
      File "C:\Users\LENOVO\AppData\Local\Temp\pip-install-cvlc63h8\dlib\setup.py", line 125, in get_cmake_version
        "\n*******************************************************************\n")
    RuntimeError:
    *******************************************************************
     CMake must be installed to build the following extensions: dlib
    *******************************************************************

    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\lenovo\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\LENOVO\\AppData\\Local\\Temp\\pip-install-cvlc63h8\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\LENOVO\\AppData\\Local\\Temp\\pip-install-cvlc63h8\\dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\LENOVO\AppData\Local\Temp\pip-record-ucbq1ylw\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.

install cmake using the pip使用 pip 安装 cmake

pip3 install cmake

then install然后安装

pip3 install dlib
pip3 install face_recognition

hopefully this might solve your problem希望这可以解决您的问题

  • pip install face_recognition==1.2.3 pip 安装 face_recognition==1.2.3
  • pip install cmake==3.14.4 pip 安装 cmake==3.14.4
  • pip install dlib==19.17.0 pip 安装 dlib==19.17.0

After installation of above packages, try to install the dlib, as above two are the main dependencies for dlib library.安装完以上包后,尝试安装dlib,以上两个是dlib库的主要依赖。

图片

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM