title: Installing dlib for Windows: "Failed building wheel for dlib" and "non-zero exit status 1"
body: <p>I'm running Python 3.6 on Windows 10 and have installed cmake (via pip), cuda 9.2 and the latest version of Visual Studio (15.9.6), along with the 2015 v140 toolset component as it's mentioned elsewhere (<a href="https://devtalk.nvidia.com/default/topic/1027299/cuda-setup-and-installation/cuda-9-failed-to-support-the-latest-visual-studio-2017-version-15-5/2" rel="nofollow noreferrer">https://devtalk.nvidia.com/default/topic/1027299/cuda-setup-and-installation/cuda-9-failed-to-support-the-latest-visual-studio-2017-version-15-5/2</a>) that is necessary:</p>
  
  <p><a href="https://i.stack.imgur.com/Xdr36.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Xdr36.png" alt="enter image description here"></a></p>
  
  <p>Upon running <code>pip install dlib</code> I get a ton of output (too much to paste here) but it includes "Failed building wheel for dlib" and the final part is as follows:</p>
  
  <pre><code>        9 Warning(s)
          10 Error(s)
  
      Time Elapsed 00:04:17.30
      Traceback (most recent call last):
        File "&lt;string&gt;", line 1, in &lt;module&gt;
        File "C:\Users\james\AppData\Local\Temp\pip-install-9erypcmb\dlib\setup.py", line 257, in &lt;module&gt;
          'Topic :: Software Development',
        File "c:\users\james\appdata\local\programs\python\python36\lib\site-packages\setuptools\__init__.py", line 129, in setup
          return distutils.core.setup(**attrs)
        File "c:\users\james\appdata\local\programs\python\python36\lib\distutils\core.py", line 148, in setup
          dist.run_commands()
        File "c:\users\james\appdata\local\programs\python\python36\lib\distutils\dist.py", line 955, in run_commands
          self.run_command(cmd)
        File "c:\users\james\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
          cmd_obj.run()
        File "c:\users\james\appdata\local\programs\python\python36\lib\site-packages\setuptools\command\install.py", line 61, in run
          return orig.install.run(self)
        File "c:\users\james\appdata\local\programs\python\python36\lib\distutils\command\install.py", line 545, in run
          self.run_command('build')
        File "c:\users\james\appdata\local\programs\python\python36\lib\distutils\cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "c:\users\james\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
          cmd_obj.run()
        File "c:\users\james\appdata\local\programs\python\python36\lib\distutils\command\build.py", line 135, in run
          self.run_command(cmd_name)
        File "c:\users\james\appdata\local\programs\python\python36\lib\distutils\cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "c:\users\james\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
          cmd_obj.run()
        File "C:\Users\james\AppData\Local\Temp\pip-install-9erypcmb\dlib\setup.py", line 133, in run
          self.build_extension(ext)
        File "C:\Users\james\AppData\Local\Temp\pip-install-9erypcmb\dlib\setup.py", line 173, in build_extension
          subprocess.check_call(cmake_build, cwd=build_folder)
        File "c:\users\james\appdata\local\programs\python\python36\lib\subprocess.py", line 291, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '/m']' returned non-zero exit status 1.
  
      ----------------------------------------
  Command "c:\users\james\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\james\\AppData\\Local\\Temp\\pip-install-9erypcmb\\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\james\AppData\Local\Temp\pip-record-21ymtq1y\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\james\AppData\Local\Temp\pip-install-9erypcmb\dlib\
  </code></pre>