Error cmake must be installed to build dlib

I have already installed CMake by pip install cmake and tried to install face_recognition but it still gives me a RuntimeError. I'm using 'Python 3.7.3, x32' I also tried to install the dlib by pip

I have already installed CMake by pip install cmake and tried to install face_recognition but it still gives me a RuntimeError. I’m using ‘Python 3.7.3, x32’

I also tried to install the dlib by pip install dlib since it is one of the reasons why I can’t install face_recognition.

C:Usersuser>python -m pip install cmake
Requirement already satisfied: cmake in c:usersuserappdataroamingpythonpython37site-packages (3.14.4)

C:Usersuser>python -m pip install dlib
Collecting dlib
  Using cached https://files.pythonhosted.org/packages/05/57/e8a8caa3c89a27f80bc78da39c423e2553f482a3705adc619176a3a24b36/dlib-19.17.0.tar.gz
Installing collected packages: dlib
  Running setup.py install for dlib ... error
    ERROR: Complete output from command 'C:PythonPython37python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\Users\user\AppData\Local\Temp\pip-install-24vk6act\dlib\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersuserAppDataLocalTemppip-record-yf2kdjpxinstall-record.txt' --single-version-externally-managed --compile:
    ERROR: 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:UsersuserAppDataLocalTemppip-install-24vk6actdlibsetup.py", line 120, in get_cmake_version
        out = subprocess.check_output(['cmake', '--version'])
      File "C:PythonPython37libsubprocess.py", line 395, in check_output
        **kwargs).stdout
      File "C:PythonPython37libsubprocess.py", line 472, in run
        with Popen(*popenargs, **kwargs) as process:
      File "C:PythonPython37libsubprocess.py", line 775, in __init__
        restore_signals, start_new_session)
      File "C:PythonPython37libsubprocess.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:UsersuserAppDataLocalTemppip-install-24vk6actdlibsetup.py", line 261, in <module>
        'Topic :: Software Development',
      File "C:UsersuserAppDataRoamingPythonPython37site-packagessetuptools__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "C:PythonPython37libdistutilscore.py", line 148, in setup
        dist.run_commands()
      File "C:PythonPython37libdistutilsdist.py", line 966, in run_commands
        self.run_command(cmd)
      File "C:PythonPython37libdistutilsdist.py", line 985, in run_command
        cmd_obj.run()
      File "C:UsersuserAppDataRoamingPythonPython37site-packagessetuptoolscommandinstall.py", line 61, in run
        return orig.install.run(self)
      File "C:PythonPython37libdistutilscommandinstall.py", line 545, in run
        self.run_command('build')
      File "C:PythonPython37libdistutilscmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:PythonPython37libdistutilsdist.py", line 985, in run_command
        cmd_obj.run()
      File "C:PythonPython37libdistutilscommandbuild.py", line 135, in run
        self.run_command(cmd_name)
      File "C:PythonPython37libdistutilscmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:PythonPython37libdistutilsdist.py", line 985, in run_command
        cmd_obj.run()
      File "C:UsersuserAppDataLocalTemppip-install-24vk6actdlibsetup.py", line 129, in run
        cmake_version = self.get_cmake_version()
      File "C:UsersuserAppDataLocalTemppip-install-24vk6actdlibsetup.py", line 125, in get_cmake_version
        "n*******************************************************************n")
    RuntimeError:
    *******************************************************************
     CMake must be installed to build the following extensions: dlib
    *******************************************************************

    ----------------------------------------
ERROR: Command "'C:PythonPython37python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\Users\user\AppData\Local\Temp\pip-install-24vk6act\dlib\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersuserAppDataLocalTemppip-record-yf2kdjpxinstall-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:UsersuserAppDataLocalTemppip-install-24vk6actdlib

Hello, I am on Windows with a fresh Installation of CMake and also have Issues with dlib library. I´m working in a virtualenv fresh Python Environment (2.7). Could not rid of my Error. Here is my Output:

`Requirement already satisfied: beautifulsoup4 in c:usersbesitzerenvssocial_mapperlibsite-packages (from -r requirements.txt (line 1)) (4.6.1)
Requirement already satisfied: selenium in c:usersbesitzerenvssocial_mapperlibsite-packages (from -r requirements.txt (line 2)) (3.14.0)
Requirement already satisfied: pyvirtualdisplay in c:usersbesitzerenvssocial_mapperlibsite-packages (from -r requirements.txt (line 3)) (0.2.1)
Requirement already satisfied: tabulate in c:usersbesitzerenvssocial_mapperlibsite-packages (from -r requirements.txt (line 4)) (0.8.2)
Requirement already satisfied: requests in c:usersbesitzerenvssocial_mapperlibsite-packages (from -r requirements.txt (line 5)) (2.19.1)
Collecting face_recognition (from -r requirements.txt (line 6))
Downloading https://files.pythonhosted.org/packages/28/10/f153bbbc218fc169768aa1c02f2e9178e9241e4af8da56289bdca2c0c217/face_recognition-1.2.2-py2.py3-none-any.whl
Collecting django (from -r requirements.txt (line 7))
Downloading https://files.pythonhosted.org/packages/f8/1c/31112c778b7a56ce18e3fff5e8915719fbe1cd3476c1eef557dddacfac8b/Django-1.11.15-py2.py3-none-any.whl (6.9MB)
Collecting numpy (from -r requirements.txt (line 8))
Downloading https://files.pythonhosted.org/packages/d0/23/de3c3f8fdee3245dd61bedc8c8de0ea5ead8adc245321be38993179ef437/numpy-1.15.0-cp27-none-win32.whl (9.9MB)
Collecting scipy (from -r requirements.txt (line 9))
Downloading https://files.pythonhosted.org/packages/1f/fa/a65088a42ed6699027c01fc0fa9fb35eb435fb6c66307c0ce541db333f35/scipy-1.1.0-cp27-none-win32.whl (26.7MB)
Collecting matplotlib (from -r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/6e/cf/0153fe3767addefdd8bc81e7f41143477a8528ddec64544ef35d06f9a38a/matplotlib-2.2.3-cp27-cp27m-win32.whl (8.3MB)
Collecting scikit-image (from -r requirements.txt (line 11))
Downloading https://files.pythonhosted.org/packages/cd/19/981c31e36814e5ddcbc0b414367f7e4f04ba850eaabe5249589a26eb4900/scikit_image-0.14.0-cp27-none-win32.whl (24.0MB)
Collecting scikit-learn (from -r requirements.txt (line 12))
Downloading https://files.pythonhosted.org/packages/15/79/f88871051db5d30e2ae88129802ffa4c3186e7a6ad090b4d2c0c2381cbfd/scikit_learn-0.19.2-cp27-cp27m-win32.whl (4.1MB)
Collecting ipython (from -r requirements.txt (line 13))
Downloading https://files.pythonhosted.org/packages/b0/88/d996ab8be22cea1eaa18baee3678a11265e18cf09974728d683c51102148/ipython-5.8.0-py2-none-any.whl (760kB)
Collecting dlib (from -r requirements.txt (line 14))
Downloading https://files.pythonhosted.org/packages/df/aa/6a9bb2a763107bb2606d6ee1aa65fcd3b51375a9ef6436e9c9280b0dd63c/dlib-19.15.0.tar.gz (3.3MB)
Collecting facebook-sdk (from -r requirements.txt (line 15))
Downloading https://files.pythonhosted.org/packages/34/ac/830c1f2821847bf191687ac57d3c8416623c7c496332cb281c949c05a308/facebook_sdk-3.0.0-py2-none-any.whl
Requirement already satisfied: urllib3 in c:usersbesitzerenvssocial_mapperlibsite-packages (from selenium->-r requirements.txt (line 2)) (1.23)
Requirement already satisfied: EasyProcess in c:usersbesitzerenvssocial_mapperlibsite-packages (from pyvirtualdisplay->-r requirements.txt (line 3)) (0.2.3)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:usersbesitzerenvssocial_mapperlibsite-packages (from requests->-r requirements.txt (line 5)) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in c:usersbesitzerenvssocial_mapperlibsite-packages (from requests->-r requirements.txt (line 5)) (2018.4.16)
Requirement already satisfied: idna<2.8,>=2.5 in c:usersbesitzerenvssocial_mapperlibsite-packages (from requests->-r requirements.txt (line 5)) (2.7)
Requirement already satisfied: Pillow in c:usersbesitzerenvssocial_mapperlibsite-packages (from face_recognition->-r requirements.txt (line 6)) (5.2.0)
Collecting face-recognition-models>=0.3.0 (from face_recognition->-r requirements.txt (line 6))
Downloading https://files.pythonhosted.org/packages/cf/3b/4fd8c534f6c0d1b80ce0973d01331525538045084c73c153ee6df20224cf/face_recognition_models-0.3.0.tar.gz (100.1MB)
Collecting Click>=6.0 (from face_recognition->-r requirements.txt (line 6))
Downloading https://files.pythonhosted.org/packages/34/c1/8806f99713ddb993c5366c362b2f908f18269f8d792aff1abfd700775a77/click-6.7-py2.py3-none-any.whl (71kB)
Collecting pytz (from django->-r requirements.txt (line 7))
Downloading https://files.pythonhosted.org/packages/30/4e/27c34b62430286c6d59177a0842ed90dc789ce5d1ed740887653b898779a/pytz-2018.5-py2.py3-none-any.whl (510kB)
Collecting kiwisolver>=1.0.1 (from matplotlib->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/6d/c5/ca9bbf1249119900e53996ed1530f073a7ada3946495231eb92a6f1f737c/kiwisolver-1.0.1-cp27-none-win32.whl (44kB)
Collecting cycler>=0.10 (from matplotlib->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/f7/d2/e07d3ebb2bd7af696440ce7e754c59dd546ffe1bbe732c8ab68b9c834e61/cycler-0.10.0-py2.py3-none-any.whl
Collecting six>=1.10 (from matplotlib->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Collecting backports.functools-lru-cache (from matplotlib->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/03/8e/2424c0e65c4a066e28f539364deee49b6451f8fcd4f718fefa50cc3dcf48/backports.functools_lru_cache-1.5-py2.py3-none-any.whl
Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 (from matplotlib->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/6a/8a/718fd7d3458f9fab8e67186b00abdd345b639976bc7fb3ae722e1b026a50/pyparsing-2.2.0-py2.py3-none-any.whl (56kB)
Collecting python-dateutil>=2.1 (from matplotlib->-r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/cf/f5/af2b09c957ace60dcfac112b669c45c8c97e32f94aa8b56da4c6d1682825/python_dateutil-2.7.3-py2.py3-none-any.whl (211kB)
Collecting PyWavelets>=0.4.0 (from scikit-image->-r requirements.txt (line 11))
Downloading https://files.pythonhosted.org/packages/1b/3d/c3f2eac79e22641a7452ec5c9120a53f2a2997a4a011247194e6182c30ca/PyWavelets-0.5.2-cp27-none-win32.whl (4.1MB)
Collecting networkx>=1.8 (from scikit-image->-r requirements.txt (line 11))
Downloading https://files.pythonhosted.org/packages/11/42/f951cc6838a4dff6ce57211c4d7f8444809ccbe2134179950301e5c4c83c/networkx-2.1.zip (1.6MB)
Collecting cloudpickle>=0.2.1 (from scikit-image->-r requirements.txt (line 11))
Downloading https://files.pythonhosted.org/packages/e7/bf/60ae7ec1e8c6742d2abbb6819c39a48ee796793bcdb7e1d5e41a3e379ddd/cloudpickle-0.5.3-py2.py3-none-any.whl
Collecting dask[array]>=0.9.0 (from scikit-image->-r requirements.txt (line 11))
Downloading https://files.pythonhosted.org/packages/91/52/427541141707ac533a6dcafa3bff7ff8b57ded3c9ea84d6ec014d15fbbff/dask-0.18.2-py2.py3-none-any.whl (645kB)
Collecting traitlets>=4.2 (from ipython->-r requirements.txt (line 13))
Downloading https://files.pythonhosted.org/packages/93/d6/abcb22de61d78e2fc3959c964628a5771e47e7cc60d53e9342e21ed6cc9a/traitlets-4.3.2-py2.py3-none-any.whl (74kB)
Collecting simplegeneric>0.8 (from ipython->-r requirements.txt (line 13))
Downloading https://files.pythonhosted.org/packages/3d/57/4d9c9e3ae9a255cd4e1106bb57e24056d3d0709fc01b2e3e345898e49d5b/simplegeneric-0.8.1.zip
Collecting backports.shutil-get-terminal-size; python_version == «2.7» (from ipython->-r requirements.txt (line 13))
Downloading https://files.pythonhosted.org/packages/7d/cd/1750d6c35fe86d35f8562091737907f234b78fdffab42b29c72b1dd861f4/backports.shutil_get_terminal_size-1.0.0-py2.py3-none-any.whl
Collecting pickleshare (from ipython->-r requirements.txt (line 13))
Downloading https://files.pythonhosted.org/packages/9f/17/daa142fc9be6b76f26f24eeeb9a138940671490b91cb5587393f297c8317/pickleshare-0.7.4-py2.py3-none-any.whl
Collecting pygments (from ipython->-r requirements.txt (line 13))
Downloading https://files.pythonhosted.org/packages/02/ee/b6e02dc6529e82b75bb06823ff7d005b141037cb1416b10c6f00fc419dca/Pygments-2.2.0-py2.py3-none-any.whl (841kB)
Collecting win-unicode-console>=0.5; sys_platform == «win32» and python_version < «3.6» (from ipython->-r requirements.txt (line 13))
Downloading https://files.pythonhosted.org/packages/89/8d/7aad74930380c8972ab282304a2ff45f3d4927108bb6693cabcc9fc6a099/win_unicode_console-0.5.zip
Collecting pathlib2; python_version == «2.7» or python_version == «3.3» (from ipython->-r requirements.txt (line 13))
Downloading https://files.pythonhosted.org/packages/66/a7/9f8d84f31728d78beade9b1271ccbfb290c41c1e4dc13dbd4997ad594dcd/pathlib2-2.3.2-py2.py3-none-any.whl
Requirement already satisfied: setuptools>=18.5 in c:usersbesitzerenvssocial_mapperlibsite-packages (from ipython->-r requirements.txt (line 13)) (40.0.0)
Collecting colorama; sys_platform == «win32» (from ipython->-r requirements.txt (line 13))
Downloading https://files.pythonhosted.org/packages/db/c8/7dcf9dbcb22429512708fe3a547f8b6101c0d02137acbd892505aee57adf/colorama-0.3.9-py2.py3-none-any.whl
Collecting decorator (from ipython->-r requirements.txt (line 13))
Downloading https://files.pythonhosted.org/packages/bc/bb/a24838832ba35baf52f32ab1a49b906b5f82fb7c76b2f6a7e35e140bac30/decorator-4.3.0-py2.py3-none-any.whl
Collecting prompt-toolkit<2.0.0,>=1.0.4 (from ipython->-r requirements.txt (line 13))
Downloading https://files.pythonhosted.org/packages/d1/b0/1a6c262da35c779dd79550137aa7c298a424987240a28792ec5ccf48f848/prompt_toolkit-1.0.15-py2-none-any.whl (247kB)
Collecting toolz>=0.7.3; extra == «array» (from dask[array]>=0.9.0->scikit-image->-r requirements.txt (line 11))
Downloading https://files.pythonhosted.org/packages/14/d0/a73c15bbeda3d2e7b381a36afb0d9cd770a9f4adc5d1532691013ba881db/toolz-0.9.0.tar.gz (45kB)
Collecting ipython-genutils (from traitlets>=4.2->ipython->-r requirements.txt (line 13))
Downloading https://files.pythonhosted.org/packages/fa/bc/9bd3b5c2b4774d5f33b2d544f1460be9df7df2fe42f352135381c347c69a/ipython_genutils-0.2.0-py2.py3-none-any.whl
Collecting enum34; python_version == «2.7» (from traitlets>=4.2->ipython->-r requirements.txt (line 13))
Downloading https://files.pythonhosted.org/packages/c5/db/e56e6b4bbac7c4a06de1c50de6fe1ef3810018ae11732a50f15f62c7d050/enum34-1.1.6-py2-none-any.whl
Collecting scandir; python_version < «3.5» (from pathlib2; python_version == «2.7» or python_version == «3.3»->ipython->-r requirements.txt (line 13))
Downloading https://files.pythonhosted.org/packages/9e/a5/56b4dec02b16bb720cac9872fccd63b61a815b70633ef15bfe3ea5ce4488/scandir-1.9.0-cp27-cp27m-win32.whl
Collecting wcwidth (from prompt-toolkit<2.0.0,>=1.0.4->ipython->-r requirements.txt (line 13))
Downloading https://files.pythonhosted.org/packages/7e/9f/526a6947247599b084ee5232e4f9190a38f398d7300d866af3ab571a5bfe/wcwidth-0.1.7-py2.py3-none-any.whl
Installing collected packages: dlib, face-recognition-models, Click, numpy, face-recognition, pytz, django, scipy, kiwisolver, six, cycler, backports.functools-lru-cache, pyparsing, python-dateutil, matplotlib, PyWavelets, decorator, networkx, cloudpickle, toolz, dask, scikit-image, scikit-learn, ipython-genutils, enum34, traitlets, simplegeneric, backports.shutil-get-terminal-size, scandir, pathlib2, pickleshare, pygments, win-unicode-console, colorama, wcwidth, prompt-toolkit, ipython, facebook-sdk
Running setup.py install for dlib: started
Running setup.py install for dlib: finished with status ‘error’
Complete output from command C:UsersBesitzerEnvsSocial_MapperScriptspython.exe -u -c «import setuptools, tokenize;file=’c:usersbesitzerappdatalocaltemppip-install-ezovfgdlibsetup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(‘rn’, ‘n’);f.close();exec(compile(code, file, ‘exec’))» install —record c:usersbesitzerappdatalocaltemppip-record-ijqey1install-record.txt —single-version-externally-managed —compile —install-headers C:UsersBesitzerEnvsSocial_Mapperincludesitepython2.7dlib:
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 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)]
Invoking CMake setup: ‘cmake c:usersbesitzerappdatalocaltemppip-install-ezovfgdlibtoolspython -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=c:usersbesitzerappdatalocaltemppip-install-ezovfgdlibbuildlib.win32-2.7 -DPYTHON_EXECUTABLE=C:UsersBesitzerEnvsSocial_MapperScriptspython.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=c:usersbesitzerappdatalocaltemppip-install-ezovfgdlibbuildlib.win32-2.7’
— Building for: Visual Studio 10 2010
— The C compiler identification is MSVC 16.0.30319.1
— The CXX compiler identification is MSVC 16.0.30319.1
— Check for working C compiler: E:/Microsoft Visual Studio 10.0/VC/bin/cl.exe
— Check for working C compiler: E:/Microsoft Visual Studio 10.0/VC/bin/cl.exe — broken
CMake Error at C:/Users/Besitzer/Envs/Social_Mapper/Lib/site-packages/cmake/data/share/cmake-3.12/Modules/CMakeTestCCompiler.cmake:52 (message):
The C compiler

    "E:/Microsoft Visual Studio 10.0/VC/bin/cl.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: C:/Users/Besitzer/AppData/Local/Temp/pip-install-ezovfg/dlib/build/temp.win32-2.7/Release/CMakeFiles/CMakeTmp

    Run Build Command:"C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe" "cmTC_8721b.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=10.0"
    Microsoft (R)-Buildmodul, Version 4.7.2558.0
    [Microsoft .NET Framework, Version 4.0.30319.42000]
    Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

    Der Buildvorgang wurde am So.12.08.2018 09:20:39 gestartet.
    Projekt "C:UsersBesitzerAppDataLocalTemppip-install-ezovfgdlibbuildtemp.win32-2.7ReleaseCMakeFilesCMakeTmpcmTC_8721b.vcxproj" auf Knoten "1" (Standardziele).
    PrepareForBuild:
      Das Verzeichnis "cmTC_8721b.dirDebug" wird erstellt.
      Das Verzeichnis "C:UsersBesitzerAppDataLocalTemppip-install-ezovfgdlibbuildtemp.win32-2.7ReleaseCMakeFilesCMakeTmpDebug" wird erstellt.
    InitializeBuildStatus:
      "cmTC_8721b.dirDebugcmTC_8721b.unsuccessfulbuild" wird erstellt, da "AlwaysCreate" angegeben wurde.
    ClCompile:
      E:Microsoft Visual Studio 10.0VCbinCL.exe /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR="Debug"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"cmTC_8721b.dirDebug\" /Fd"cmTC_8721b.dirDebugvc100.pdb" /Gd /TC /analyze- /errorReport:queue testCCompiler.c
      Microsoft (R) 32-Bit C/C++-Optimierungscompiler Version 16.00.30319.01 für 80x86
      Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

      cl /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR="Debug"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"cmTC_8721b.dirDebug\" /Fd"cmTC_8721b.dirDebugvc100.pdb" /Gd /TC /analyze- /errorReport:queue testCCompiler.c

      testCCompiler.c
    ManifestResourceCompile:
      C:Program Files (x86)Microsoft SDKsWindowsv7.0Abinrc.exe /nologo /fo"cmTC_8721b.dirDebugcmTC_8721b.exe.embed.manifest.res" cmTC_8721b.dirDebugcmTC_8721b_manifest.rc
    Link:
      E:Microsoft Visual Studio 10.0VCbinlink.exe /ERRORREPORT:QUEUE /OUT:"C:UsersBesitzerAppDataLocalTemppip-install-ezovfgdlibbuildtemp.win32-2.7ReleaseCMakeFilesCMakeTmpDebugcmTC_8721b.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /ManifestFile:"cmTC_8721b.dirDebugcmTC_8721b.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:/Users/Besitzer/AppData/Local/Temp/pip-install-ezovfg/dlib/build/temp.win32-2.7/Release/CMakeFiles/CMakeTmp/Debug/cmTC_8721b.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/Users/Besitzer/AppData/Local/Temp/pip-install-ezovfg/dlib/build/temp.win32-2.7/Release/CMakeFiles/CMakeTmp/Debug/cmTC_8721b.lib" /MACHINE:X86 cmTC_8721b.dirDebugcmTC_8721b.exe.embed.manifest.res
      cmTC_8721b.dirDebugtestCCompiler.obj  /machine:X86
    LINK : fatal error LNK1123: Fehler bei der Konvertierung in COFF: Datei ist ung├é┬│ltig oder besch├â┬Ádigt. [C:UsersBesitzerAppDataLocalTemppip-install-ezovfgdlibbuildtemp.win32-2.7ReleaseCMakeFilesCMakeTmpcmTC_8721b.vcxproj]
    Die Erstellung des Projekts "C:UsersBesitzerAppDataLocalTemppip-install-ezovfgdlibbuildtemp.win32-2.7ReleaseCMakeFilesCMakeTmpcmTC_8721b.vcxproj" ist abgeschlossen (Standardziele) -- FEHLER.

    Fehler beim Buildvorgang.

    "C:UsersBesitzerAppDataLocalTemppip-install-ezovfgdlibbuildtemp.win32-2.7ReleaseCMakeFilesCMakeTmpcmTC_8721b.vcxproj" (Standardziel) (1) ->
    (Link Ziel) ->
      LINK : fatal error LNK1123: Fehler bei der Konvertierung in COFF: Datei ist ung├é┬│ltig oder besch├â┬Ádigt. [C:UsersBesitzerAppDataLocalTemppip-install-ezovfgdlibbuildtemp.win32-2.7ReleaseCMakeFilesCMakeTmpcmTC_8721b.vcxproj]

        0 Warnung(en)
        1 Fehler

    Verstrichene Zeit 00:00:00.23




  CMake will not be able to correctly generate this project.


-- Configuring incomplete, errors occurred!
See also "C:/Users/Besitzer/AppData/Local/Temp/pip-install-ezovfg/dlib/build/temp.win32-2.7/Release/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Besitzer/AppData/Local/Temp/pip-install-ezovfg/dlib/build/temp.win32-2.7/Release/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "c:usersbesitzerappdatalocaltemppip-install-ezovfgdlibsetup.py", line 257, in <module>
    'Topic :: Software Development',
  File "C:UsersBesitzerEnvsSocial_Mapperlibsite-packagessetuptools__init__.py", line 131, in setup
    return distutils.core.setup(**attrs)
  File "e:python27Libdistutilscore.py", line 151, in setup
    dist.run_commands()
  File "e:python27Libdistutilsdist.py", line 953, in run_commands
    self.run_command(cmd)
  File "e:python27Libdistutilsdist.py", line 972, in run_command
    cmd_obj.run()
  File "C:UsersBesitzerEnvsSocial_Mapperlibsite-packagessetuptoolscommandinstall.py", line 61, in run
    return orig.install.run(self)
  File "e:python27Libdistutilscommandinstall.py", line 563, in run
    self.run_command('build')
  File "e:python27Libdistutilscmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "e:python27Libdistutilsdist.py", line 972, in run_command
    cmd_obj.run()
  File "e:python27Libdistutilscommandbuild.py", line 127, in run
    self.run_command(cmd_name)
  File "e:python27Libdistutilscmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "e:python27Libdistutilsdist.py", line 972, in run_command
    cmd_obj.run()
  File "c:usersbesitzerappdatalocaltemppip-install-ezovfgdlibsetup.py", line 133, in run
    self.build_extension(ext)
  File "c:usersbesitzerappdatalocaltemppip-install-ezovfgdlibsetup.py", line 170, in build_extension
    subprocess.check_call(cmake_setup, cwd=build_folder)
  File "e:python27Libsubprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'c:\users\besitzer\appdata\local\temp\pip-install-ezovfg\dlib\tools\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=c:\users\besitzer\appdata\local\temp\pip-install-ezovfg\dlib\build\lib.win32-2.7', '-DPYTHON_EXECUTABLE=C:\Users\Besitzer\Envs\Social_Mapper\Scripts\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=c:\users\besitzer\appdata\local\temp\pip-install-ezovfg\dlib\build\lib.win32-2.7']' returned non-zero exit status 1

----------------------------------------

`

I googled a little bit and find something about cmake modules:
`C:UsersBesitzer>cmake —help-module FindPython2
FindPython2

Find Python 2 interpreter, compiler and development environment (include
directories and libraries).

Three components are supported:

  • Interpreter: search for Python 2 interpreter
  • Compiler: search for Python 2 compiler. Only offered by IronPython.
  • Development: search for development artifacts (include directories and
    libraries)` etc.

Issue

While using docker build -t /flask-docker to create an image to later upload it to heroku, I get the following errors:

#8 417.3   ERROR: CMake must be installed to build dlib
#8 417.3
#8 417.3   ----------------------------------------
#8 417.3   ERROR: Failed building wheel for dlib
#8 417.3   Running setup.py clean for dlib
#8 417.8 Successfully built audioread collection face-recognition-models imutils resampy termcolor wrapt
#8 417.8 Failed to build dlib
#8 418.8 Installing collected packages: urllib3, pyasn1, idna, chardet, certifi, zipp, typing-extensions, six, rsa, requests, pyasn1-modules, oauthlib, cachetools, requests-oauthlib, pyparsing, pycparser, numpy, llvmlite, importlib-metadata, google-auth, dataclasses, Werkzeug, threadpoolctl, tensorboard-plugin-wit, tensorboard-data-server, scipy, protobuf, packaging, numba, MarkupSafe, Markdown, joblib, grpcio, google-auth-oauthlib, cffi, cached-property, appdirs, absl-py, wrapt, tqdm, termcolor, tensorflow-estimator, tensorboard, SoundFile, scikit-learn, resampy, regex, pytz, python-dateutil, pooch, Pillow, opt-einsum, Keras-Preprocessing, keras-nightly, Jinja2, itsdangerous, h5py, google-pasta, gast, flatbuffers, face-recognition-models, dlib, decorator, click, audioread, astunparse, wincertstore, waitress, tensorflow, pandas, opencv-python-headless, nltk, librosa, imutils, gunicorn, Flask, face-recognition, colorama, collection, cmake
#8 464.8     Running setup.py install for dlib: started
#8 466.5     Running setup.py install for dlib: finished with status 'error'
#8 466.5     ERROR: Command errored out with exit status 1:
#8 466.5      command: /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-f582pi1r/dlib_8d153cd287b84149b3470adfe644cdd4/setup.py'"'"'; __file__='"'"'/tmp/pip-install-f582pi1r/dlib_8d153cd287b84149b3470adfe644cdd4/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 /tmp/pip-record-93izef49/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6m/dlib
#8 466.5          cwd: /tmp/pip-install-f582pi1r/dlib_8d153cd287b84149b3470adfe644cdd4/
#8 466.5     Complete output (8 lines):
#8 466.5     running install
#8 466.5     running build
#8 466.5     running build_py
#8 466.5     package init file 'tools/python/dlib/__init__.py' not found (or not a regular file)
#8 466.5     running build_ext
#8 466.5
#8 466.5     ERROR: CMake must be installed to build dlib
#8 466.5
#8 466.5     ----------------------------------------
#8 466.5 ERROR: Command errored out with exit status 1: /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-f582pi1r/dlib_8d153cd287b84149b3470adfe644cdd4/setup.py'"'"'; __file__='"'"'/tmp/pip-install-f582pi1r/dlib_8d153cd287b84149b3470adfe644cdd4/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 /tmp/pip-record-93izef49/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6m/dlib Check the logs for full command output.
------
executor failed running [/bin/sh -c pip install -r requirements.txt]: exit code: 1

This is my Dockerfile setup:

FROM python:3.6.13

ENV APP_HOME /app
WORKDIR $APP_HOME

COPY . /app

RUN pip install -r requirements.txt

ENTRYPOINT ["python app.py"]

Solution

Might need to do RUN apt-get update && apt-get install -y cmake before the pip install.

Answered By — Itamar Turner-Trauring

I am trying to install dlib on Pycharm (which is similar to Anaconda) in order to use it for my Python and OpenCV face detection project.

I have installed cMake and upgraded Python but there is still an error:

Command

pip install dlib

Error

FileNotFoundError: [WinError 2] The system cannot find the file specified

Command output

Collecting dlib
  Using cached https://files.pythonhosted.org/packages/05/57/e8a8caa3c89a27f80bc78da39c423e2553f482a3705adc619176a3a24b36/dlib-19.17.0.tar.gz
Installing collected packages: dlib
Running setup.py install for dlib: started
Running setup.py install for dlib: finished with status 'error'
Complete output from command C:UsersmehrsPycharmProjectsproject2venvScriptspython.exe -u -c "import setuptools, tokenize;__file__='C:\Users\mehrs\AppData\Local\Temp\pycharm-packaging\dlib\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:UsersmehrsAppDataLocalTemppip-record-_nvwlk_iinstall-record.txt --single-version-externally-managed --compile --install-headers C:UsersmehrsPycharmProjectsproject2venvincludesitepython3.7dlib:
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
Traceback (most recent call last):
  File "C:UsersmehrsAppDataLocalTemppycharm-packagingdlibsetup.py", line 120, in get_cmake_version
    out = subprocess.check_output(['cmake', '--version'])
  File "C:UsersmehrsAppDataLocalProgramsPythonPython37-32libsubprocess.py", line 395, in check_output
    **kwargs).stdout
  File "C:UsersmehrsAppDataLocalProgramsPythonPython37-32libsubprocess.py", line 472, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:UsersmehrsAppDataLocalProgramsPythonPython37-32libsubprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "C:UsersmehrsAppDataLocalProgramsPythonPython37-32libsubprocess.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:UsersmehrsAppDataLocalTemppycharm-packagingdlibsetup.py", line 261, in <module>
    'Topic :: Software Development',
  File "C:UsersmehrsPycharmProjectsproject2venvlibsite-packagessetuptools-39.1.0-py3.7.eggsetuptools__init__.py", line 129, in setup
  File "C:UsersmehrsAppDataLocalProgramsPythonPython37-32libdistutilscore.py", line 148, in setup
    dist.run_commands()
  File "C:UsersmehrsAppDataLocalProgramsPythonPython37-32libdistutilsdist.py", line 966, in run_commands
    self.run_command(cmd)
  File "C:UsersmehrsAppDataLocalProgramsPythonPython37-32libdistutilsdist.py", line 985, in run_command
    cmd_obj.run()
  File "C:UsersmehrsPycharmProjectsproject2venvlibsite-packagessetuptools-39.1.0-py3.7.eggsetuptoolscommandinstall.py", line 61, in run
  File "C:UsersmehrsAppDataLocalProgramsPythonPython37-32libdistutilscommandinstall.py", line 545, in run
    self.run_command('build')
  File "C:UsersmehrsAppDataLocalProgramsPythonPython37-32libdistutilscmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:UsersmehrsAppDataLocalProgramsPythonPython37-32libdistutilsdist.py", line 985, in run_command
    cmd_obj.run()
  File "C:UsersmehrsAppDataLocalProgramsPythonPython37-32libdistutilscommandbuild.py", line 135, in run
    self.run_command(cmd_name)
  File "C:UsersmehrsAppDataLocalProgramsPythonPython37-32libdistutilscmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:UsersmehrsAppDataLocalProgramsPythonPython37-32libdistutilsdist.py", line 985, in run_command
    cmd_obj.run()
  File "C:UsersmehrsAppDataLocalTemppycharm-packagingdlibsetup.py", line 129, in run
    cmake_version = self.get_cmake_version()
  File "C:UsersmehrsAppDataLocalTemppycharm-packagingdlibsetup.py", line 125, in get_cmake_version
    "n*******************************************************************n")
RuntimeError:
*******************************************************************
 CMake must be installed to build the following extensions: dlib
*******************************************************************


----------------------------------------

Command "C:UsersmehrsPycharmProjectsproject2venvScriptspython.exe -u -c "import setuptools, tokenize;__file__='C:\Users\mehrs\AppData\Local\Temp\pycharm-packaging\dlib\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:UsersmehrsAppDataLocalTemppip-record-_nvwlk_iinstall-record.txt --single-version-externally-managed --compile --install-headers C:UsersmehrsPycharmProjectsproject2venvincludesitepython3.7dlib" failed with error code 1 in C:UsersmehrsAppDataLocalTemppycharm-packagingdlib
You are using pip version 10.0.1, however version 19.0.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

RRS feed

  • Remove From My Forums
  • Question

  • While pushing the code through local git, installation is failing with reason CMake must be installed to build the following extensions: dlib.

    How to enable dlib in webapp when using code for deployment? Should i use any docker images for this purpose?

All replies

  • Hi,

    Thanks for raising the issue.

    Which docker image are you using? If dlib or any other library is missing, you might be able to install it using a Startup script.

  • I couldn’t create a docker image as my system contains windows 10 home which it seems is not supported.

    My requirement file contains below libraries for python3.6

    Django==2.2.3
    django-appconf==1.0.3
    djangorestframework==3.9.4
    Pillow==6.1.0
    pytz==2019.2
    six==1.12.0
    sqlparse==0.3.0
    scikit-learn==0.21.3
    scipy==1.3.0
    numpy==1.16.4
    opencv-python==4.1.0.25
    dlib
    whitenoise==4.1

  • Could you please send an email to AzCommunity[at]Microsoft[dot]com referencing
    this thread, we would like to work closer with you on this matter

This is an old blog and some information might be obsolete. We have published new instructions. You can find them here:

  1. Setup exe installers for Windows
  2. Install OpenCV from source on Windows

We already have a post for installing OpenCV 3 on Windows which covers how to install OpenCV3 from source for working with both C++ and Python codes. However, many readers have faced problems while installing OpenCV 3 on Windows from source. This post is for those readers who want to install OpenCV on Windows for writing Python code only.

If you are still not able to install OpenCV on your system, but want to get started with it, we suggest using our docker images with pre-installed OpenCV, Dlib, miniconda and jupyter notebooks along with other dependencies as described in this post.

Step 1: Install Anaconda (a python distribution)

Download and install Anaconda 64-bit version from https://www.continuum.io/downloads.

It is advised to install Anaconda for Python 3.

Download and Install 64-bit Anaconda 2 or Anaconda 3 or both

While installing Anaconda make sure that you check both options:

  1. Add Anaconda to my PATH environment variable
  2. Register Anaconda as my default Python
Add Anaconda to System PATH and make it default Python

Step 2 : Create Virtual Environment

Open the command prompt and execute the following command.

conda create --name opencv-env python=3.6

You should get an output as shown below:

Press Enter and the environment will be installed and you should get an output as shown below :

3.1. Activate the environment

# See how the (opencv-env) appears before the prompt after this command.
activate opencv-env

3.2. Install OpenCV and other important packages

Continuing from the above prompt, execute the following commands

pip install numpy scipy matplotlib scikit-learn jupyter
pip install opencv-contrib-python
pip install dlib

3.3. Test your installation

Open the python prompt on the command line by typing python on the command prompt

import cv2
cv2.__version__
import dlib
dlib.__version__

You should get the following output

Subscribe & Download Code

If you liked this article and would like to download code (C++ and Python) and example images used in this post, please click here. Alternately, sign up to receive a free Computer Vision Resource Guide. In our newsletter, we share OpenCV tutorials and examples written in C++/Python, and Computer Vision and Machine Learning algorithms and news.

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Error cloud not load dll prototype2enginef dll
  • Error cloud not find or load main class
  • Error cloud not create the java virtual machine
  • Error cloud not connected mikrotik
  • Error cloud not access game process shutdown rockstar games launcher and steam

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии