ageitgey / face_recognition

The world's simplest facial recognition api for Python and the command line
MIT License
53.45k stars 13.49k forks source link

Unable to install dlbi despite meeting the requirements #886

Open talhakabakus opened 5 years ago

talhakabakus commented 5 years ago

Description

Unable to install dlibvia pip3despite meeting the requirements.

What I Did

(PyInstagram)  C:\Users\talha\Documents\PyCharmProjects\PyInstagram>pipenv install dlib
Installing dlib…
Adding dlib to Pipfile's [packages]…
Installation Succeeded
Installing dependencies from Pipfile.lock (025c81)…
An error occurred while installing dlib==19.17.0 --hash=sha256:92587c81b0165e933593f505fdf099dface0d0f8ec874b1d8655fc774598911f! Will try again.
  ================================ 33/33 - 00:00:18
Installing initially failed dependencies…
[pipenv.exceptions.InstallError]:   File "c:\users\talha\appdata\local\programs\python\python37\lib\site-packages\pipenv\core.py", line 1992, in do_install
[pipenv.exceptions.InstallError]:       skip_lock=skip_lock,
[pipenv.exceptions.InstallError]:   File "c:\users\talha\appdata\local\programs\python\python37\lib\site-packages\pipenv\core.py", line 1253, in do_init
[pipenv.exceptions.InstallError]:       pypi_mirror=pypi_mirror,
[pipenv.exceptions.InstallError]:   File "c:\users\talha\appdata\local\programs\python\python37\lib\site-packages\pipenv\core.py", line 859, in do_install_dependencies
[pipenv.exceptions.InstallError]:       retry_list, procs, failed_deps_queue, requirements_dir, **install_kwargs
[pipenv.exceptions.InstallError]:   File "c:\users\talha\appdata\local\programs\python\python37\lib\site-packages\pipenv\core.py", line 763, in batch_install
[pipenv.exceptions.InstallError]:       _cleanup_procs(procs, not blocking, failed_deps_queue, retry=retry)
[pipenv.exceptions.InstallError]:   File "c:\users\talha\appdata\local\programs\python\python37\lib\site-packages\pipenv\core.py", line 681, in _cleanup_procs
[pipenv.exceptions.InstallError]:       raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: ['Collecting dlib==19.17.0 (from -r C:\\Users\\talha\\AppData\\Local\\Temp\\pipenv-eqzx9xm2-requirements\\pipenv-npdc0rt0-requirement.txt (line 1))', '  Using cached
 https://files.pythonhosted.org/packages/05/57/e8a8caa3c89a27f80bc78da39c423e2553f482a3705adc619176a3a24b36/dlib-19.17.0.tar.gz', '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: dlib', '
  Running setup.py install for dlib: started', "    Running setup.py install for dlib: finished with status 'error'"]
[pipenv.exceptions.InstallError]: ['ERROR: Complete output from command \'c:\\users\\talha\\.virtualenvs\\pyinstagram-pg2yw2ki\\scripts\\python.exe\' -u -c \'import setuptools, tokenize;__file__=\'"\
'"\'C:\\\\Users\\\\talha\\\\AppData\\\\Local\\\\Temp\\\\pip-install-5mu5xtwh\\\\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\\talha\\AppData\\Local\\Temp\\pip-wheel-7thfqj2_\' --python-tag cp37:', '  ER
ROR: running bdist_wheel', '  running build', '  running build_py', "  package init file 'dlib\\__init__.py' not found (or not a regular file)", '  warning: build_py: byte-compiling is disabled, skip
ping.', '  ', '  running build_ext', '  Traceback (most recent call last):', '    File "C:\\Users\\talha\\AppData\\Local\\Temp\\pip-install-5mu5xtwh\\dlib\\setup.py", line 120, in get_cmake_version',
 "      out = subprocess.check_output(['cmake', '--version'])", '    File "C:\\Users\\talha\\AppData\\Local\\Programs\\Python\\Python37\\Lib\\subprocess.py", line 395, in check_output', '      **kwar
gs).stdout', '    File "C:\\Users\\talha\\AppData\\Local\\Programs\\Python\\Python37\\Lib\\subprocess.py", line 472, in run', '      with Popen(*popenargs, **kwargs) as process:', '    File "C:\\User
s\\talha\\AppData\\Local\\Programs\\Python\\Python37\\Lib\\subprocess.py", line 775, in __init__', '      restore_signals, start_new_session)', '    File "C:\\Users\\talha\\AppData\\Local\\Programs\\
Python\\Python37\\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\\talha\\AppData\\Local\\Temp\\pip-ins
tall-5mu5xtwh\\dlib\\setup.py", line 261, in <module>', "      'Topic :: Software Development',", '    File "c:\\users\\talha\\.virtualenvs\\pyinstagram-pg2yw2ki\\lib\\site-packages\\setuptools\\__in
it__.py", line 145, in setup', '      return distutils.core.setup(**attrs)', '    File "C:\\Users\\talha\\AppData\\Local\\Programs\\Python\\Python37\\Lib\\distutils\\core.py", line 148, in setup', '
     dist.run_commands()', '    File "C:\\Users\\talha\\AppData\\Local\\Programs\\Python\\Python37\\Lib\\distutils\\dist.py", line 966, in run_commands', '      self.run_command(cmd)', '    File "C:\
\Users\\talha\\AppData\\Local\\Programs\\Python\\Python37\\Lib\\distutils\\dist.py", line 985, in run_command', '      cmd_obj.run()', '    File "c:\\users\\talha\\.virtualenvs\\pyinstagram-pg2yw2ki\
\lib\\site-packages\\wheel\\bdist_wheel.py", line 192, in run', "      self.run_command('build')", '    File "C:\\Users\\talha\\AppData\\Local\\Programs\\Python\\Python37\\Lib\\distutils\\cmd.py", li
ne 313, in run_command', '      self.distribution.run_command(command)', '    File "C:\\Users\\talha\\AppData\\Local\\Programs\\Python\\Python37\\Lib\\distutils\\dist.py", line 985, in run_command',
'      cmd_obj.run()', '    File "C:\\Users\\talha\\AppData\\Local\\Programs\\Python\\Python37\\Lib\\distutils\\command\\build.py", line 135, in run', '      self.run_command(cmd_name)', '    File "C
:\\Users\\talha\\AppData\\Local\\Programs\\Python\\Python37\\Lib\\distutils\\cmd.py", line 313, in run_command', '      self.distribution.run_command(command)', '    File "C:\\Users\\talha\\AppData\\
Local\\Programs\\Python\\Python37\\Lib\\distutils\\dist.py", line 985, in run_command', '      cmd_obj.run()', '    File "C:\\Users\\talha\\AppData\\Local\\Temp\\pip-install-5mu5xtwh\\dlib\\setup.py"
, line 129, in run', '      cmake_version = self.get_cmake_version()', '    File "C:\\Users\\talha\\AppData\\Local\\Temp\\pip-install-5mu5xtwh\\dlib\\setup.py", line 125, in get_cmake_version', '
  "\\n*******************************************************************\\n")', '  RuntimeError:', '  *******************************************************************', '   CMake must be installe
d to build the following extensions: dlib', '  *******************************************************************', '  ', '  ----------------------------------------', '  ERROR: Failed building whee
l for dlib', '    ERROR: Complete output from command \'c:\\users\\talha\\.virtualenvs\\pyinstagram-pg2yw2ki\\scripts\\python.exe\' -u -c \'import setuptools, tokenize;__file__=\'"\'"\'C:\\\\Users\\\
\talha\\\\AppData\\\\Local\\\\Temp\\\\pip-install-5mu5xtwh\\\\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\\talha\\AppData\\Local\\Temp\\pip-record-he5mpd2y\\install-record.txt\' --single-version-exte
rnally-managed --compile --install-headers \'c:\\users\\talha\\.virtualenvs\\pyinstagram-pg2yw2ki\\include\\site\\python3.7\\dlib\':', '    ERROR: running install', '    running build', '    running
build_py', "    package init file 'dlib\\__init__.py' not found (or not a regular file)", '    warning: build_py: byte-compiling is disabled, skipping.', '    ', '    running build_ext', '    Traceba
ck (most recent call last):', '      File "C:\\Users\\talha\\AppData\\Local\\Temp\\pip-install-5mu5xtwh\\dlib\\setup.py", line 120, in get_cmake_version', "        out = subprocess.check_output(['cma
ke', '--version'])", '      File "C:\\Users\\talha\\AppData\\Local\\Programs\\Python\\Python37\\Lib\\subprocess.py", line 395, in check_output', '        **kwargs).stdout', '      File "C:\\Users\\ta
lha\\AppData\\Local\\Programs\\Python\\Python37\\Lib\\subprocess.py", line 472, in run', '        with Popen(*popenargs, **kwargs) as process:', '      File "C:\\Users\\talha\\AppData\\Local\\Program
s\\Python\\Python37\\Lib\\subprocess.py", line 775, in __init__', '        restore_signals, start_new_session)', '      File "C:\\Users\\talha\\AppData\\Local\\Programs\\Python\\Python37\\Lib\\subpro
cess.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\\talha\\AppData\\Local\\Temp\\pip-install-5mu5xtwh
\\dlib\\setup.py", line 261, in <module>', "        'Topic :: Software Development',", '      File "c:\\users\\talha\\.virtualenvs\\pyinstagram-pg2yw2ki\\lib\\site-packages\\setuptools\\__init__.py",
 line 145, in setup', '        return distutils.core.setup(**attrs)', '      File "C:\\Users\\talha\\AppData\\Local\\Programs\\Python\\Python37\\Lib\\distutils\\core.py", line 148, in setup', '
  dist.run_commands()', '      File "C:\\Users\\talha\\AppData\\Local\\Programs\\Python\\Python37\\Lib\\distutils\\dist.py", line 966, in run_commands', '        self.run_command(cmd)', '      File "
C:\\Users\\talha\\AppData\\Local\\Programs\\Python\\Python37\\Lib\\distutils\\dist.py", line 985, in run_command', '        cmd_obj.run()', '      File "c:\\users\\talha\\.virtualenvs\\pyinstagram-pg
2yw2ki\\lib\\site-packages\\setuptools\\command\\install.py", line 61, in run', '        return orig.install.run(self)', '      File "C:\\Users\\talha\\AppData\\Local\\Programs\\Python\\Python37\\Lib
\\distutils\\command\\install.py", line 545, in run', "        self.run_command('build')", '      File "C:\\Users\\talha\\AppData\\Local\\Programs\\Python\\Python37\\Lib\\distutils\\cmd.py", line 313
, in run_command', '        self.distribution.run_command(command)', '      File "C:\\Users\\talha\\AppData\\Local\\Programs\\Python\\Python37\\Lib\\distutils\\dist.py", line 985, in run_command', '
       cmd_obj.run()', '      File "C:\\Users\\talha\\AppData\\Local\\Programs\\Python\\Python37\\Lib\\distutils\\command\\build.py", line 135, in run', '        self.run_command(cmd_name)', '      F
ile "C:\\Users\\talha\\AppData\\Local\\Programs\\Python\\Python37\\Lib\\distutils\\cmd.py", line 313, in run_command', '        self.distribution.run_command(command)', '      File "C:\\Users\\talha\
\AppData\\Local\\Programs\\Python\\Python37\\Lib\\distutils\\dist.py", line 985, in run_command', '        cmd_obj.run()', '      File "C:\\Users\\talha\\AppData\\Local\\Temp\\pip-install-5mu5xtwh\\d
lib\\setup.py", line 129, in run', '        cmake_version = self.get_cmake_version()', '      File "C:\\Users\\talha\\AppData\\Local\\Temp\\pip-install-5mu5xtwh\\dlib\\setup.py", line 125, in get_cma
ke_version', '        "\\n*******************************************************************\\n")', '    RuntimeError:', '    *******************************************************************', '
    CMake must be installed to build the following extensions: dlib', '    *******************************************************************', '    ', '    ----------------------------------------'
, 'ERROR: Command "\'c:\\users\\talha\\.virtualenvs\\pyinstagram-pg2yw2ki\\scripts\\python.exe\' -u -c \'import setuptools, tokenize;__file__=\'"\'"\'C:\\\\Users\\\\talha\\\\AppData\\\\Local\\\\Temp\
\\\pip-install-5mu5xtwh\\\\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\\talha\\AppData\\Local\\Temp\\pip-record-he5mpd2y\\install-record.txt\' --single-version-externally-managed --compile --install-
headers \'c:\\users\\talha\\.virtualenvs\\pyinstagram-pg2yw2ki\\include\\site\\python3.7\\dlib\'" failed with error code 1 in C:\\Users\\talha\\AppData\\Local\\Temp\\pip-install-5mu5xtwh\\dlib\\']
ERROR: ERROR: Package installation failed...
Fwinter1 commented 5 years ago

Is cmake installed?

Face_recognition is not officially supported on Windows, but you can install it with cmake installed (can be installed with pip). Might not be the issue, worth checking.

talhakabakus commented 5 years ago

Yes, CMake is already installed.

akashravichandran commented 5 years ago

I faced the same problem when trying to install dlib inside a virtual environment. Can you try installing without the virtual environment and see!

probalanturoy commented 5 years ago

I faced the same problem when trying to install dlib inside a virtual environment. Can you try installing without the virtual environment and see!

Did you solve the problem??

akashravichandran commented 5 years ago

I suggested a method which worked for me. Kindly review with the issue creator for updates. Thank you.

imretuvi commented 4 years ago

Solved the problem for me in MacOS 10.14.6. Thanks!

thoangnguyen1308 commented 4 years ago

(opencv-env) C:\Users\huuthoang>pip install face_recognition Requirement already satisfied: face_recognition in c:\users\huuthoang\appdata\local\continuum\anaconda3\envs\opencv-env\lib\site-packages (1.3.0) Collecting dlib>=19.7 Using cached dlib-19.19.0.tar.gz (3.2 MB) Requirement already satisfied: face-recognition-models>=0.3.0 in c:\users\huuthoang\appdata\local\continuum\anaconda3\envs\opencv-env\lib\site-packages (from face_recognition) (0.3.0) Requirement already satisfied: Pillow in c:\users\huuthoang\appdata\local\continuum\anaconda3\envs\opencv-env\lib\site-packages (from face_recognition) (7.0.0) Requirement already satisfied: numpy in c:\users\huuthoang\appdata\local\continuum\anaconda3\envs\opencv-env\lib\site-packages (from face_recognition) (1.18.2) Requirement already satisfied: Click>=6.0 in c:\users\huuthoang\appdata\local\continuum\anaconda3\envs\opencv-env\lib\site-packages (from face_recognition) (7.1.1) Building wheels for collected packages: dlib Building wheel for dlib (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\setup.py'"'"'; file='"'"'C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\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\HUUTHO~1\AppData\Local\Temp\pip-wheel-xubwn6f0' cwd: C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\ Complete output (55 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 Building extension for Python 3.7.6 | packaged by conda-forge | (default, Mar 5 2020, 14:47:50) [MSC v.1916 64 bit (AMD64)] Invoking CMake setup: 'cmake C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\build\lib.win-amd64-3.7 -DPYTHON_EXECUTABLE=C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\build\lib.win-amd64-3.7 -A x64' -- Building for: NMake Makefiles CMake Error at CMakeLists.txt:3 (project): Generator

  NMake Makefiles

does not support platform specification, but platform

  x64

was specified.

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage -- Configuring incomplete, errors occurred! See also "C:/Users/huuthoang/AppData/Local/Temp/pip-install-k7rhtn03/dlib/build/temp.win-amd64-3.7/Release/CMakeFiles/CMakeOutput.log". Traceback (most recent call last): File "", line 1, in File "C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\setup.py", line 261, in 'Topic :: Software Development', File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\setuptools__init__.py", line 144, in setup return distutils.core.setup(**attrs) File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\core.py", line 148, in setup dist.run_commands() File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\dist.py", line 966, in run_commands self.run_command(cmd) File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\wheel\bdist_wheel.py", line 223, in run self.run_command('build') File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\command\build.py", line 135, in run self.run_command(cmd_name) File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\setup.py", line 135, in run self.build_extension(ext) File "C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\setup.py", line 172, in build_extension subprocess.check_call(cmake_setup, cwd=build_folder) File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', 'C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\tools\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\build\lib.win-amd64-3.7', '-DPYTHON_EXECUTABLE=C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\build\lib.win-amd64-3.7', '-A', 'x64']' returned non-zero exit status 1.

ERROR: Failed building wheel for dlib Running setup.py clean for dlib Failed to build dlib ERROR: Error checking for conflicts. Traceback (most recent call last): File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\pip_vendor\pkg_resources__init.py", line 3021, in _dep_map return self.dep_map File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\pip_vendor\pkg_resources__init.py", line 2815, in getattr__ raise AttributeError(attr) AttributeError: _DistInfoDistribution__dep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\pip_vendor\pkg_resources__init__.py", line 3012, in _parsed_pkg_info return self._pkg_info File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\pip_vendor\pkg_resources__init.py", line 2815, in getattr__ raise AttributeError(attr) AttributeError: _pkg_info

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\pip_internal\commands\install.py", line 517, in _warn_about_conflicts package_set, _dep_info = check_install_conflicts(to_install) File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\pip_internal\operations\check.py", line 114, in check_install_conflicts packageset, = create_package_set_from_installed() File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\pip_internal\operations\check.py", line 53, in create_package_set_from_installed package_set[name] = PackageDetails(dist.version, dist.requires()) File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\pip_vendor\pkg_resources__init.py", line 2736, in requires dm = self._dep_map File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\pip_vendor\pkg_resources__init.py", line 3023, in _dep_map self.dep_map = self._compute_dependencies() File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\pip_vendor\pkg_resources__init.py", line 3032, in _compute_dependencies for req in self._parsed_pkg_info.get_all('Requires-Dist') or []: File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\pip_vendor\pkg_resources__init__.py", line 3014, in _parsed_pkg_info metadata = self.get_metadata(self.PKG_INFO) File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\pip_vendor\pkg_resources\init.py", line 1420, in get_metadata value = self._get(path) File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\pip_vendor\pkg_resources\init__.py", line 1616, in _get with open(path, 'rb') as stream: FileNotFoundError: [Errno 2] No such file or directory: 'c:\users\huuthoang\appdata\local\continuum\anaconda3\envs\opencv-env\lib\site-packages\parso-0.6.2.dist-info\METADATA' Installing collected packages: dlib Running setup.py install for dlib ... error ERROR: Command errored out with exit status 1: command: 'C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\setup.py'"'"'; file='"'"'C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\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\HUUTHO~1\AppData\Local\Temp\pip-record-77juuwz4\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\Include\dlib' cwd: C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\ Complete output (57 lines): running install running build running build_py package init file 'dlib__init__.py' not found (or not a regular file) running build_ext Building extension for Python 3.7.6 | packaged by conda-forge | (default, Mar 5 2020, 14:47:50) [MSC v.1916 64 bit (AMD64)] Invoking CMake setup: 'cmake C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\build\lib.win-amd64-3.7 -DPYTHON_EXECUTABLE=C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\build\lib.win-amd64-3.7 -A x64' -- Building for: NMake Makefiles CMake Error at CMakeLists.txt:3 (project): Generator

    NMake Makefiles

  does not support platform specification, but platform

    x64

  was specified.

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "C:/Users/huuthoang/AppData/Local/Temp/pip-install-k7rhtn03/dlib/build/temp.win-amd64-3.7/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\setup.py", line 261, in <module>
    'Topic :: Software Development',
  File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\setuptools\__init__.py", line 144, in setup
    return distutils.core.setup(**attrs)
  File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\setuptools\command\install.py", line 61, in run
    return orig.install.run(self)
  File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\command\install.py", line 545, in run
    self.run_command('build')
  File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\command\build.py", line 135, in run
    self.run_command(cmd_name)
  File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\setup.py", line 135, in run
    self.build_extension(ext)
  File "C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\setup.py", line 172, in build_extension
    subprocess.check_call(cmake_setup, cwd=build_folder)
  File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\HUUTHO~1\\AppData\\Local\\Temp\\pip-install-k7rhtn03\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\HUUTHO~1\\AppData\\Local\\Temp\\pip-install-k7rhtn03\\dlib\\build\\lib.win-amd64-3.7', '-DPYTHON_EXECUTABLE=C:\\Users\\huuthoang\\AppData\\Local\\Continuum\\anaconda3\\envs\\opencv-env\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\HUUTHO~1\\AppData\\Local\\Temp\\pip-install-k7rhtn03\\dlib\\build\\lib.win-amd64-3.7', '-A', 'x64']' returned non-zero exit status 1.
----------------------------------------

ERROR: Command errored out with exit status 1: 'C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\setup.py'"'"'; file='"'"'C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\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\HUUTHO~1\AppData\Local\Temp\pip-record-77juuwz4\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\Include\dlib' Check the logs for full command output. how to fix?