dlib Windows 10

Created on 6 Mar 2020  路  7Comments  路  Source: davisking/dlib

IF YOU ARE REPORTING A BUG OR PROBLEM WITH DLIB THEN FILL OUT THE ENTIRE TEMPLATE BELOW. ISSUES ASKING QUESTIONS ABOUT WHY SOMETHING DOESN'T WORK THAT FAIL TO FILL OUT THE ENTIRE TEMPLATE WILL BE CLOSED.

It is OK to suggest interesting improvements to dlib, even if you are not volunteering to implement them. However, the issue tracker is not a code writing service, do not ask for someone to write code for you. E.g. Do not ask for feature improvements to the example programs. If there is some feature improvement you want in an example program then it's up to you to write it.

Before you ask a question, check Google for a solution, the dlib FAQ, or consult the dlib documentation. Every single function in dlib is documented in detail. If you obviously haven't read the documentation your issue will be closed.

If you aren't reporting a bug or problem with dlib then delete this template and write whatever you want here.


Expected Behavior

Its regular install dlib with pip install dlib and getting that error in my laptop with windows 10 python 3.8 or python 3.7(already try it), but in my PC thats work fine.

Current Behavior

ERROR: Command errored out with exit status 1:
command: 'C:\Users\HP.conda\envs\tensorflow\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\HP\AppData\Local\Temp\pip-install-yywsib9b\dlib\setup.py'"'"'; __file__='"'"'C:\Users\HP\AppData\Local\Temp\pip-install-yywsib9b\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\HP\AppData\Local\Temp\pip-record-_2tujx9b\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\HP.conda\envs\tensorflow\Include\dlib'
cwd: C:\Users\HP\AppData\Local\Temp\pip-install-yywsib9b\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 (default, Jan 8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\HP\AppData\Local\Temp\pip-install-yywsib9b\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\HP\AppData\Local\Temp\pip-install-yywsib9b\dlib\build\lib.win-amd64-3.7 -DPYTHON_EXECUTABLE=C:\Users\HP.conda\envs\tensorflow\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\HP\AppData\Local\Temp\pip-install-yywsib9b\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/HP/AppData/Local/Temp/pip-install-yywsib9b/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\HP\AppData\Local\Temp\pip-install-yywsib9b\dlib\setup.py", line 261, in <module>
    'Topic :: Software Development',
  File "C:\Users\HP\.conda\envs\tensorflow\lib\site-packages\setuptools\__init__.py", line 144, in setup
    return distutils.core.setup(**attrs)
  File "C:\Users\HP\.conda\envs\tensorflow\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Users\HP\.conda\envs\tensorflow\lib\distutils\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "C:\Users\HP\.conda\envs\tensorflow\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\HP\.conda\envs\tensorflow\lib\site-packages\setuptools\command\install.py", line 61, in run
    return orig.install.run(self)
  File "C:\Users\HP\.conda\envs\tensorflow\lib\distutils\command\install.py", line 545, in run
    self.run_command('build')
  File "C:\Users\HP\.conda\envs\tensorflow\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\HP\.conda\envs\tensorflow\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\HP\.conda\envs\tensorflow\lib\distutils\command\build.py", line 135, in run
    self.run_command(cmd_name)
  File "C:\Users\HP\.conda\envs\tensorflow\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\HP\.conda\envs\tensorflow\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\HP\AppData\Local\Temp\pip-install-yywsib9b\dlib\setup.py", line 135, in run
    self.build_extension(ext)
  File "C:\Users\HP\AppData\Local\Temp\pip-install-yywsib9b\dlib\setup.py", line 172, in build_extension
    subprocess.check_call(cmake_setup, cwd=build_folder)
  File "C:\Users\HP\.conda\envs\tensorflow\lib\subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\HP\\AppData\\Local\\Temp\\pip-install-yywsib9b\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\HP\\AppData\\Local\\Temp\\pip-install-yywsib9b\\dlib\\build\\lib.win-amd64-3.7', '-DPYTHON_EXECUTABLE=C:\\Users\\HP\\.conda\\envs\\tensorflow\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\HP\\AppData\\Local\\Temp\\pip-install-yywsib9b\\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\HP.conda\envs\tensorflow\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\HP\AppData\Local\Temp\pip-install-yywsib9b\dlib\setup.py'"'"'; __file__='"'"'C:\Users\HP\AppData\Local\Temp\pip-install-yywsib9b\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\HP\AppData\Local\Temp\pip-record-_2tujx9b\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\HP.conda\envs\tensorflow\Include\dlib' Check the logs for full command output.

Steps to Reproduce

I'm doing regular step such as pip install dlib, and already try download from dlib.net

  • Version: 19.19
  • Where did you get dlib: from pip install dlib, and dlib.net
  • Platform: Windows 10 64bit
  • Compiler: python 3.8

All 7 comments

Same problem, but with Python 2.7 and Windows 7 x64

You have to install visual studio so you can compile dlib.

I installed dlib on windows for python 3.7 with pip install dlib and it was installed successfully. I have cmake as well as visual studio installed. Have you tried to install it with pip install dlib

@davisking @raibove thanks, that's work maybe in some Windows platform visual studio is required as requirement.
@Dante4 try install visual studio first... work's for me...

It was installed, but for some reason cmake refused to see it, yeah

@Dante4 already try to add cmake to your path?

Reinstallation of cmake and VS fixed it, I'm good now

Was this page helpful?
0 / 5 - 0 ratings