New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Installation Tutorial #175

Closed
masoudr opened this Issue Sep 14, 2017 · 120 comments

Comments

Projects
None yet
@masoudr

masoudr commented Sep 14, 2017

Hi,
I've successfully installed and tested this tool on my windows 10 machine and I'm writing a simple procedure to install it. It may be useful for some people try to use this tool on a Windows machine.

IMPORTANT: Actually this project has made for Linux systems and especially dlib. In my tests, the performance of this tool in Windows 10 was about a quarter in comparison with Ubuntu built with the same specs. But I haven't seen any difference between these two in other subjects.

Read First:
The new version of dlib doesn't need Boost anymore so you can skip it. Remember that you still need to meet the following requirements.
Requirments:
(I've used this tutorial with these tools installed on Windows 10 but the newer versions may work too.)

  1. Microsoft Visual Studio 2015 with C/C++ Compiler installed. (Visual C++ 2015 Build Tools didn't work for me and I got into problems in compiling dlib)
  2. Boost library version 1.63 or newer. Also, you can use precompiled binaries for specific MSVC you have but I don't suggest. (I've included the compiling procedure of Boost in this tutorial)
  3. Of course Python3 (I used Python3.5 x64 but the other versions may work too)
  4. CMake for windows and add it to your system environment variables.

Installation:
Easy installation:
Just install dlib and face_recognition (not always on newest version):
pip install dlib and then pip install face_recognition.

Manual installation:

  1. Download and install scipy and numpy+mkl (must be mkl version) packages from this link (all credits goes to Christoph Gohlke). Remember to grab correct version based on your current Python version.
  2. Download Boost library source code or binary release for your current MSVC from this link.
  3. If you downloaded the binary version skip to step 4 else follow these steps to compile and build Boost by yourself:
    3-1. Extract the Boost source files into C:\local\boost_1_XX_X (X means the current version of Boost you have)
    3-2. Create a system variable with these parameters:
    Name: VS140COMNTOOLS
    Value: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\ (or any path where you have installed MSVC)
    3-3. Open Developer Command Prompt for Visual Studio and go to the current directory of Boost extracted and try these commands to compile Boost:
    bootstrap
    b2 -a --with-python address-model=64 toolset=msvc runtime-link=static
    3-4. If you successfully compile Boost, it should create compiled files in stage directory.
  4. (If you have already compiled Boost skip this step) If you already download the binary release just extract the contents to C:\local\boost_1_XX_X
  5. Grab latest version of dlib from this repo and extract it.
  6. Go to dlibdirectory and open cmd and follow these commands to build dlib: (remember to replace XX with current version of Boost you have)
    set BOOST_ROOT=C:\local\boost_X_XX_X
    set BOOST_LIBRARYDIR=C:\local\boost_X_XX_X\stage\lib
    python setup.py install --yes USE_AVX_INSTRUCTIONS or python setup.py install --yes USE_AVX_INSTRUCTIONS --yes DLIB_USE_CUDA
  7. Now you can use import dlib without any problem into your python script.
  8. You can also check the current version of dlib with pip show dlib.
  9. Now simply install face_recognition with pip install face_recognition.
  10. Enjoy!

Finally, I need to say thanks to @ageitgey and @davisking for their awesome work.

@TheDogeOfTheInternet

This comment has been minimized.

Show comment
Hide comment
@TheDogeOfTheInternet

TheDogeOfTheInternet Sep 14, 2017

You don't need to manually install dlib. I was able to install it with pip (through the pip install face_recognition command) after I had Boost and CMake installed.

Which leads me to my second point; your tutorial does not mention CMake at all. I have no idea what CMake actually does, so it may not be required, but if it does have something to do with simplifying the install process, you should add it to your tutorial.

TheDogeOfTheInternet commented Sep 14, 2017

You don't need to manually install dlib. I was able to install it with pip (through the pip install face_recognition command) after I had Boost and CMake installed.

Which leads me to my second point; your tutorial does not mention CMake at all. I have no idea what CMake actually does, so it may not be required, but if it does have something to do with simplifying the install process, you should add it to your tutorial.

@masoudr

This comment has been minimized.

Show comment
Hide comment
@masoudr

masoudr Sep 14, 2017

@TheDogeOfTheInternet yes you are right the CMake is a must and I forgot to add it but it is just used to compile dliband Boost. I've edited my post and add it thanks.
And for your first question yes you can use pipto install it but the latest versions are always on his Github repository and website so you need to compile it by yourself. Also, you can configure your compilation.

masoudr commented Sep 14, 2017

@TheDogeOfTheInternet yes you are right the CMake is a must and I forgot to add it but it is just used to compile dliband Boost. I've edited my post and add it thanks.
And for your first question yes you can use pipto install it but the latest versions are always on his Github repository and website so you need to compile it by yourself. Also, you can configure your compilation.

@ageitgey

This comment has been minimized.

Show comment
Hide comment
@ageitgey

ageitgey Sep 17, 2017

Owner

Thanks @masoudr! I'll link it from the README.

Owner

ageitgey commented Sep 17, 2017

Thanks @masoudr! I'll link it from the README.

@ageitgey

This comment has been minimized.

Show comment
Hide comment
Owner

ageitgey commented Sep 17, 2017

@ageitgey ageitgey closed this Sep 17, 2017

@PBShortStop

This comment has been minimized.

Show comment
Hide comment
@PBShortStop

PBShortStop Sep 19, 2017

hello @masoudr, i want to know CMake install procedure. Thanks.

PBShortStop commented Sep 19, 2017

hello @masoudr, i want to know CMake install procedure. Thanks.

@masoudr

This comment has been minimized.

Show comment
Hide comment
@masoudr

masoudr Sep 19, 2017

@PBShortStop Installation of CMake in windows is very simple just grab the installation file (*.msi) from this link and install it. Remember to check the "Add CMake to system path" during the installation. Then you can simply use cmake --version in command prompt.

masoudr commented Sep 19, 2017

@PBShortStop Installation of CMake in windows is very simple just grab the installation file (*.msi) from this link and install it. Remember to check the "Add CMake to system path" during the installation. Then you can simply use cmake --version in command prompt.

@BachDoXuan

This comment has been minimized.

Show comment
Hide comment
@BachDoXuan

BachDoXuan Sep 28, 2017

Dear all,
I've tried several times to build dlib, but waited more than 1 hour at face_recognition.cpp without seeing any progress. I redo it several times but still get stuck there. Can you help me with it?

BachDoXuan commented Sep 28, 2017

Dear all,
I've tried several times to build dlib, but waited more than 1 hour at face_recognition.cpp without seeing any progress. I redo it several times but still get stuck there. Can you help me with it?

@runt1m33rr0r

This comment has been minimized.

Show comment
Hide comment
@runt1m33rr0r

runt1m33rr0r Sep 28, 2017

@BachDoXuan you need to use the visual studio 2015 compiler(msvc-14.0), 14.1 is bugged. You also need at least 2GB RAM, because face_recognition.cpp takes a lot of memory during compilation(which could be the reason it takes so long).

runt1m33rr0r commented Sep 28, 2017

@BachDoXuan you need to use the visual studio 2015 compiler(msvc-14.0), 14.1 is bugged. You also need at least 2GB RAM, because face_recognition.cpp takes a lot of memory during compilation(which could be the reason it takes so long).

@BachDoXuan

This comment has been minimized.

Show comment
Hide comment
@BachDoXuan

BachDoXuan Sep 28, 2017

I use VS CE 2017, 8GB RAM laptop. I use Windows 10 Pro but the windows is not activated. I have no idea what problem I have. Can you help me to install dlib?

BachDoXuan commented Sep 28, 2017

I use VS CE 2017, 8GB RAM laptop. I use Windows 10 Pro but the windows is not activated. I have no idea what problem I have. Can you help me to install dlib?

@masoudr

This comment has been minimized.

Show comment
Hide comment
@masoudr

masoudr Sep 29, 2017

@BachDoXuan I used MSVC-14 and haven't tested the 2017 version. Are you using the precompiled version of Boost or compiling it by yourself?
Remember that some of the steps in this tutorial are for MSVC-14 and if you want to use with other versions you need to modify them.
Could you provide the error log?

masoudr commented Sep 29, 2017

@BachDoXuan I used MSVC-14 and haven't tested the 2017 version. Are you using the precompiled version of Boost or compiling it by yourself?
Remember that some of the steps in this tutorial are for MSVC-14 and if you want to use with other versions you need to modify them.
Could you provide the error log?

@BachDoXuan

This comment has been minimized.

Show comment
Hide comment
@BachDoXuan

BachDoXuan Sep 29, 2017

@masoudr @neutrinobomber Thank you very much for your helps. The screen doesn't have any error log. It just got stuck when building dlib at face_recognition.cpp, I waited for more than hour every time I got there. But currently when I use command "pip install face_recognition" directly, then it succeeds.

BachDoXuan commented Sep 29, 2017

@masoudr @neutrinobomber Thank you very much for your helps. The screen doesn't have any error log. It just got stuck when building dlib at face_recognition.cpp, I waited for more than hour every time I got there. But currently when I use command "pip install face_recognition" directly, then it succeeds.

@masoudr

This comment has been minimized.

Show comment
Hide comment
@masoudr

masoudr Sep 29, 2017

@BachDoXuan You are right, you can always use pip to install this package without any further work on windows. This tutorial is for the people who wanted to build dlib from source or do some configurations to it.

masoudr commented Sep 29, 2017

@BachDoXuan You are right, you can always use pip to install this package without any further work on windows. This tutorial is for the people who wanted to build dlib from source or do some configurations to it.

@davisking

This comment has been minimized.

Show comment
Hide comment
@davisking

davisking Sep 29, 2017

davisking commented Sep 29, 2017

@loqpa

This comment has been minimized.

Show comment
Hide comment
@loqpa

loqpa Oct 4, 2017

Hey! I have a problem while following this tutorial.
My versions are:
Python 3.5.4
dlib 19.7
boost 1.65.1
(using "with cuda" and "with avx" options)

jpeg.lib(jdatadst.c.obj) : error LNK2019: unresolved external symbol _imp_ferror referenced in function term_destination [C:\Users\Loqpa\Downloads\dlib-master\dlib-master\tools\python\build\dlib.vcxproj]
jpeg.lib(jmemmgr.c.obj) : error LNK2019: unresolved external symbol __imp___stdio_common_vsscanf referenced in function vsscanf_l [C:\Users\Loqpa\Downloads\dlib-master\dlib-master\tools\python\build\dlib.vcxproj]
jpeg.lib(jmemansi.c.obj) : error LNK2019: unresolved external symbol imp_tmpfile referenced in function jpeg_open_backing_store [C:\Users\Loqpa\Downloads\dlib-master\dlib-master\tools\python\build\dlib.vcxproj]
C:\Users\Loqpa\Downloads\dlib-master\dlib-master\tools\python\build\Release\dlib.pyd : fatal error LNK1120: 3 unresolved externals [C:\Users\Loqpa\Downloads\dlib-master\dlib-master\tools\python\build\dlib
.vcxproj]

Any ideas how to fix it? I am up to trying everything you suggest:)

loqpa commented Oct 4, 2017

Hey! I have a problem while following this tutorial.
My versions are:
Python 3.5.4
dlib 19.7
boost 1.65.1
(using "with cuda" and "with avx" options)

jpeg.lib(jdatadst.c.obj) : error LNK2019: unresolved external symbol _imp_ferror referenced in function term_destination [C:\Users\Loqpa\Downloads\dlib-master\dlib-master\tools\python\build\dlib.vcxproj]
jpeg.lib(jmemmgr.c.obj) : error LNK2019: unresolved external symbol __imp___stdio_common_vsscanf referenced in function vsscanf_l [C:\Users\Loqpa\Downloads\dlib-master\dlib-master\tools\python\build\dlib.vcxproj]
jpeg.lib(jmemansi.c.obj) : error LNK2019: unresolved external symbol imp_tmpfile referenced in function jpeg_open_backing_store [C:\Users\Loqpa\Downloads\dlib-master\dlib-master\tools\python\build\dlib.vcxproj]
C:\Users\Loqpa\Downloads\dlib-master\dlib-master\tools\python\build\Release\dlib.pyd : fatal error LNK1120: 3 unresolved externals [C:\Users\Loqpa\Downloads\dlib-master\dlib-master\tools\python\build\dlib
.vcxproj]

Any ideas how to fix it? I am up to trying everything you suggest:)

@masoudr

This comment has been minimized.

Show comment
Hide comment
@masoudr

masoudr Oct 4, 2017

@loqpa Hi,
Are you using a precompiled version of boost with MSVC14?
Try to add these system environment variables too:
VS110COMNTOOLS C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\
VS120COMNTOOLS C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\
VS110COMNTOOLS C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\
VSSDK140Install C:\Program Files (x86)\Microsoft Visual Studio 14.0\VSSDK\
I don't know the exact cause of your problem but it seems that some of the library files are not recognized by dlib.

masoudr commented Oct 4, 2017

@loqpa Hi,
Are you using a precompiled version of boost with MSVC14?
Try to add these system environment variables too:
VS110COMNTOOLS C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\
VS120COMNTOOLS C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\
VS110COMNTOOLS C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\
VSSDK140Install C:\Program Files (x86)\Microsoft Visual Studio 14.0\VSSDK\
I don't know the exact cause of your problem but it seems that some of the library files are not recognized by dlib.

@loqpa

This comment has been minimized.

Show comment
Hide comment
@loqpa

loqpa Oct 6, 2017

@masoudr Hello!
I am compiling boost by myself (following steps 3-1... 3-4) and my system environment variables were already set the way you suggested.
Tried with boost 1.63, got the same error.
Any other ideas?
By the way, i am using Anaconda python, in case it matters.

loqpa commented Oct 6, 2017

@masoudr Hello!
I am compiling boost by myself (following steps 3-1... 3-4) and my system environment variables were already set the way you suggested.
Tried with boost 1.63, got the same error.
Any other ideas?
By the way, i am using Anaconda python, in case it matters.

@masoudr

This comment has been minimized.

Show comment
Hide comment
@masoudr

masoudr Oct 6, 2017

@loqpa I used this method for the specified version of dependencies, so I am not sure if they work for other versions too.
As I know your problem is causing by missing some dll files on dlib's compile. I think you can try first submit your issue on dlib repository here, maybe @davisking have an answer to it and second use the exact procedure I mentioned here. I don't' know much about Anaconda try to exclude it.

masoudr commented Oct 6, 2017

@loqpa I used this method for the specified version of dependencies, so I am not sure if they work for other versions too.
As I know your problem is causing by missing some dll files on dlib's compile. I think you can try first submit your issue on dlib repository here, maybe @davisking have an answer to it and second use the exact procedure I mentioned here. I don't' know much about Anaconda try to exclude it.

@Klinsman21

This comment has been minimized.

Show comment
Hide comment
@Klinsman21

Klinsman21 Oct 7, 2017

Does anyone have the link to download, Microsoft Visual Studio 2015 with C / C ++ Compiler

Klinsman21 commented Oct 7, 2017

Does anyone have the link to download, Microsoft Visual Studio 2015 with C / C ++ Compiler

@masoudr

This comment has been minimized.

Show comment
Hide comment
@masoudr

masoudr Oct 7, 2017

@Klinsman21 google is your friend :) try this.

masoudr commented Oct 7, 2017

@Klinsman21 google is your friend :) try this.

@loqpa

This comment has been minimized.

Show comment
Hide comment
@loqpa

loqpa Oct 7, 2017

@masoudr what dlib version did you use? I can use precompiled version 19.4 without any problems but i am really curious about new(19.5+) cnn face_detector :)

loqpa commented Oct 7, 2017

@masoudr what dlib version did you use? I can use precompiled version 19.4 without any problems but i am really curious about new(19.5+) cnn face_detector :)

@masoudr

This comment has been minimized.

Show comment
Hide comment
@masoudr

masoudr Oct 8, 2017

@loqpa If you compile dlib from the source you can always use the latest features and besides of that you can customize the compilation for specific configuration like disable/enable AVX instruction, CUDA feature, etc. I used v19.6 but newer versions would work too. You can find new features on dlib's website in here.

masoudr commented Oct 8, 2017

@loqpa If you compile dlib from the source you can always use the latest features and besides of that you can customize the compilation for specific configuration like disable/enable AVX instruction, CUDA feature, etc. I used v19.6 but newer versions would work too. You can find new features on dlib's website in here.

@cmlyldz

This comment has been minimized.

Show comment
Hide comment
@cmlyldz

cmlyldz Oct 11, 2017

Can anybody help me ?
VC 2015
boost 1_65_1
dlib 19.7

libboost_python3-vc140-mt-s-1_65_1.lib(errors.obj) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' [D:\DEV\dlib-master\tools\python\build\dlib_.vcxproj]
1 Warning(s)
1 Error(s)
Time Elapsed 00:04:35.66
error: cmake build failed!

cmlyldz commented Oct 11, 2017

Can anybody help me ?
VC 2015
boost 1_65_1
dlib 19.7

libboost_python3-vc140-mt-s-1_65_1.lib(errors.obj) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' [D:\DEV\dlib-master\tools\python\build\dlib_.vcxproj]
1 Warning(s)
1 Error(s)
Time Elapsed 00:04:35.66
error: cmake build failed!

@masoudr

This comment has been minimized.

Show comment
Hide comment
@masoudr

masoudr Oct 11, 2017

@cmlyldz You are trying to compile an X86 code on X64 compiler or vice-versa. Try to use VS2015 x86 Native Tools Command Prompt to compile dlib and remember that your python architecture must be same.

masoudr commented Oct 11, 2017

@cmlyldz You are trying to compile an X86 code on X64 compiler or vice-versa. Try to use VS2015 x86 Native Tools Command Prompt to compile dlib and remember that your python architecture must be same.

@cmlyldz

This comment has been minimized.

Show comment
Hide comment
@cmlyldz

cmlyldz Oct 12, 2017

@masoudr Thanks for answer. The problem was my python but there is no problem thanks to you.

cmlyldz commented Oct 12, 2017

@masoudr Thanks for answer. The problem was my python but there is no problem thanks to you.

@hepingtao

This comment has been minimized.

Show comment
Hide comment
@hepingtao

hepingtao Oct 13, 2017

@masoudr I have also encountered exactly the same problem as @cmlyldz . And I used VS2015 x86 Native Tools Command Prompt to compile dlib, but the problem didn't go.

hepingtao commented Oct 13, 2017

@masoudr I have also encountered exactly the same problem as @cmlyldz . And I used VS2015 x86 Native Tools Command Prompt to compile dlib, but the problem didn't go.

@masoudr

This comment has been minimized.

Show comment
Hide comment
@masoudr

masoudr Oct 13, 2017

@hepingtao Please give me more information about the exact version of your tools like python version?

masoudr commented Oct 13, 2017

@hepingtao Please give me more information about the exact version of your tools like python version?

@cmlyldz

This comment has been minimized.

Show comment
Hide comment
@cmlyldz

cmlyldz Oct 13, 2017

@hepingtao be careful while downloading scipy, numpy you have to download them x86 like others(if you want to use x86). Also python, boost and also dlib must compile on x86 also. If you did everything in an x86 compiler (or x64) there will be no error.

cmlyldz commented Oct 13, 2017

@hepingtao be careful while downloading scipy, numpy you have to download them x86 like others(if you want to use x86). Also python, boost and also dlib must compile on x86 also. If you did everything in an x86 compiler (or x64) there will be no error.

@008karan

This comment has been minimized.

Show comment
Hide comment
@008karan

008karan Oct 15, 2017

I have installed cmak and added to path but while installing dlib getting message to install cmak

008karan commented Oct 15, 2017

I have installed cmak and added to path but while installing dlib getting message to install cmak

@masoudr

This comment has been minimized.

Show comment
Hide comment
@masoudr

masoudr Oct 15, 2017

@008karan If your CMake is successfully added, you can use cmake --version in cmd to verify that. I'm not sure if the problem will exist but put your complete error log here.

masoudr commented Oct 15, 2017

@008karan If your CMake is successfully added, you can use cmake --version in cmd to verify that. I'm not sure if the problem will exist but put your complete error log here.

@008karan

This comment has been minimized.

Show comment
Hide comment
@008karan

008karan Oct 16, 2017

getting this message ......
C:\Users\karan\Downloads\dlib-master>python setup.py install
running install
running bdist_egg
running build
Detected Python architecture: 64bit
Detected platform: win32
Removing build directory C:\Users\karan\Downloads\dlib-master./tools/python/bui
ld
Configuring cmake ...
-- Building for: NMake Makefiles
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error in CMakeLists.txt:
The CMAKE_C_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
CMake Error in CMakeLists.txt:
The CMAKE_CXX_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "C:/Users/karan/Downloads/dlib-master/tools/python/build/CMakeFiles/CMa
keOutput.log".
See also "C:/Users/karan/Downloads/dlib-master/tools/python/build/CMakeFiles/CMa
keError.log".
error: cmake configuration failed!

008karan commented Oct 16, 2017

getting this message ......
C:\Users\karan\Downloads\dlib-master>python setup.py install
running install
running bdist_egg
running build
Detected Python architecture: 64bit
Detected platform: win32
Removing build directory C:\Users\karan\Downloads\dlib-master./tools/python/bui
ld
Configuring cmake ...
-- Building for: NMake Makefiles
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error in CMakeLists.txt:
The CMAKE_C_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
CMake Error in CMakeLists.txt:
The CMAKE_CXX_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "C:/Users/karan/Downloads/dlib-master/tools/python/build/CMakeFiles/CMa
keOutput.log".
See also "C:/Users/karan/Downloads/dlib-master/tools/python/build/CMakeFiles/CMa
keError.log".
error: cmake configuration failed!

@masoudr

This comment has been minimized.

Show comment
Hide comment
@masoudr

masoudr Oct 16, 2017

@008karan Try to run setup process with VS2015 x86\X64 Native Tools Command Prompt.

masoudr commented Oct 16, 2017

@008karan Try to run setup process with VS2015 x86\X64 Native Tools Command Prompt.

@7633

This comment has been minimized.

Show comment
Hide comment
@7633

7633 Oct 27, 2017

@loqpa

Hey! I have a problem while following this tutorial.
My versions are:
Python 3.5.4
dlib 19.7
boost 1.65.1
(using "with cuda" and "with avx" options)

jpeg.lib(jdatadst.c.obj) : error LNK2019: unresolved external symbol _imp_ferror referenced in function term_destination [C:\Users\Loqpa\Downloads\dlib-master\dlib-master\tools\python\build\dlib.vcxproj]
jpeg.lib(jmemmgr.c.obj) : error LNK2019: unresolved external symbol __imp___stdio_common_vsscanf referenced in function vsscanf_l [C:\Users\Loqpa\Downloads\dlib-master\dlib-master\tools\python\build\dlib.vcxproj]
jpeg.lib(jmemansi.c.obj) : error LNK2019: unresolved external symbol imp_tmpfile referenced in function jpeg_open_backing_store [C:\Users\Loqpa\Downloads\dlib-master\dlib-master\tools\python\build\dlib.vcxproj]
C:\Users\Loqpa\Downloads\dlib-master\dlib-master\tools\python\build\Release\dlib.pyd : fatal error LNK1120: 3 unresolved externals [C:\Users\Loqpa\Downloads\dlib-master\dlib-master\tools\python\build\dlib.vcxproj]

Any ideas how to fix it? I am up to trying everything you suggest:)

I had the same problem, and have solved it.
I'm using anaconda3 python3.5 and when setup.py generate install project, it get jpeg library from %Anaconda3%/envs/%your_env%/Library/lib/jpeg.lib
This jpeg.lib using by pyqt package. And there are functions, that don't agree with declspec needed by dlib.

To solve problem, switch your cmd to your virtual_env, and upgrade libjpeg from anaconda channel, e.g.:
activate my_env
conda install -c anaconda libjpeg

After that, go to your %Anaconda3%/envs/%your_env%/Library/lib/ directory and make sure, that you have exactly libjpeg.lib, then temprorary move files jpeg.lib and jpeg-static.lib to your home directory.

Now, your have true libjpeg.lib, that python's setup.py cmake catch up from %Anaconda3%/envs/%your_env%/Library/lib/.

Run python setup.py install --yes USE_AVX_INSTRUCTIONS --yes DLIB_USE_CUDA and enjoy.

Don't forget move back your 'jpeg.lib' to %Anaconda3%/envs/%your_env%/Library/lib/ directory provide for pyqt package.

Note, that your don't using virtual env, your lib directory will be %Anaconda3%/Library/lib/
Work in VS2015 x64 Native Tools Command Prompt

7633 commented Oct 27, 2017

@loqpa

Hey! I have a problem while following this tutorial.
My versions are:
Python 3.5.4
dlib 19.7
boost 1.65.1
(using "with cuda" and "with avx" options)

jpeg.lib(jdatadst.c.obj) : error LNK2019: unresolved external symbol _imp_ferror referenced in function term_destination [C:\Users\Loqpa\Downloads\dlib-master\dlib-master\tools\python\build\dlib.vcxproj]
jpeg.lib(jmemmgr.c.obj) : error LNK2019: unresolved external symbol __imp___stdio_common_vsscanf referenced in function vsscanf_l [C:\Users\Loqpa\Downloads\dlib-master\dlib-master\tools\python\build\dlib.vcxproj]
jpeg.lib(jmemansi.c.obj) : error LNK2019: unresolved external symbol imp_tmpfile referenced in function jpeg_open_backing_store [C:\Users\Loqpa\Downloads\dlib-master\dlib-master\tools\python\build\dlib.vcxproj]
C:\Users\Loqpa\Downloads\dlib-master\dlib-master\tools\python\build\Release\dlib.pyd : fatal error LNK1120: 3 unresolved externals [C:\Users\Loqpa\Downloads\dlib-master\dlib-master\tools\python\build\dlib.vcxproj]

Any ideas how to fix it? I am up to trying everything you suggest:)

I had the same problem, and have solved it.
I'm using anaconda3 python3.5 and when setup.py generate install project, it get jpeg library from %Anaconda3%/envs/%your_env%/Library/lib/jpeg.lib
This jpeg.lib using by pyqt package. And there are functions, that don't agree with declspec needed by dlib.

To solve problem, switch your cmd to your virtual_env, and upgrade libjpeg from anaconda channel, e.g.:
activate my_env
conda install -c anaconda libjpeg

After that, go to your %Anaconda3%/envs/%your_env%/Library/lib/ directory and make sure, that you have exactly libjpeg.lib, then temprorary move files jpeg.lib and jpeg-static.lib to your home directory.

Now, your have true libjpeg.lib, that python's setup.py cmake catch up from %Anaconda3%/envs/%your_env%/Library/lib/.

Run python setup.py install --yes USE_AVX_INSTRUCTIONS --yes DLIB_USE_CUDA and enjoy.

Don't forget move back your 'jpeg.lib' to %Anaconda3%/envs/%your_env%/Library/lib/ directory provide for pyqt package.

Note, that your don't using virtual env, your lib directory will be %Anaconda3%/Library/lib/
Work in VS2015 x64 Native Tools Command Prompt

@loqpa

This comment has been minimized.

Show comment
Hide comment
@loqpa

loqpa Oct 27, 2017

@7633
Thank you for your help!
Temporarily removing jpeg.lib was enough for dlib 19.7 to compile successfully.

loqpa commented Oct 27, 2017

@7633
Thank you for your help!
Temporarily removing jpeg.lib was enough for dlib 19.7 to compile successfully.

@davisking

This comment has been minimized.

Show comment
Hide comment
@davisking

davisking Oct 28, 2017

You guys shouldn't need to do this kind of hack to make it work. I've updated dlib's build scripts to detect the broken libjpeg in anaconda and avoid linking to it. So now you should be able to say python setup.py install and it should just work.

davisking commented Oct 28, 2017

You guys shouldn't need to do this kind of hack to make it work. I've updated dlib's build scripts to detect the broken libjpeg in anaconda and avoid linking to it. So now you should be able to say python setup.py install and it should just work.

@mahecode

This comment has been minimized.

Show comment
Hide comment
@mahecode

mahecode Oct 28, 2017

screenshot 13

Why i am facing this error. Help please!!!

mahecode commented Oct 28, 2017

screenshot 13

Why i am facing this error. Help please!!!

@masoudr

This comment has been minimized.

Show comment
Hide comment
@masoudr

masoudr Oct 28, 2017

@mahecode I think you are using dlib with pip. This tutorial is made for compiling dlib from source and it has been tested with python 3.4+. Please post complete error log or try to compile from source.

masoudr commented Oct 28, 2017

@mahecode I think you are using dlib with pip. This tutorial is made for compiling dlib from source and it has been tested with python 3.4+. Please post complete error log or try to compile from source.

@mahecode

This comment has been minimized.

Show comment
Hide comment
@mahecode

mahecode Oct 29, 2017

@masoudr its shows above following error when face_recognition starts to install on my machine . iam asking for the help for this error

mahecode commented Oct 29, 2017

@masoudr its shows above following error when face_recognition starts to install on my machine . iam asking for the help for this error

@PBShortStop

This comment has been minimized.

Show comment
Hide comment
@PBShortStop

PBShortStop Oct 30, 2017

Hello, @masoudr I have a problem while following this tutorial.

window 10
vs 2015
Python 3.5.3
dlib 19.4
boost 1.65.1

LINK : fatal error LNK1104: 'python36.lib' cannot open file. [~/dlib-master\tools\python\build\dlib_.vcxproj]

"~\dlib-master\tools\python\build\dlib_.vcxproj" Project built (default target) - Failed

PBShortStop commented Oct 30, 2017

Hello, @masoudr I have a problem while following this tutorial.

window 10
vs 2015
Python 3.5.3
dlib 19.4
boost 1.65.1

LINK : fatal error LNK1104: 'python36.lib' cannot open file. [~/dlib-master\tools\python\build\dlib_.vcxproj]

"~\dlib-master\tools\python\build\dlib_.vcxproj" Project built (default target) - Failed

@masoudr

This comment has been minimized.

Show comment
Hide comment
@masoudr

masoudr Oct 30, 2017

@PBShortStop It is very strange, first make sure that there is no space in your working directory second check your python version in cmd with python --version. Are you using python 3.5? Your error is about not finding the python36.lib which is for Python 3.6. Try with the latest version of dlib like 19.7 and make sure about the version of python (boost, python and MSVC must be on the same architecture like X64 or X86 before compiling dlib).

masoudr commented Oct 30, 2017

@PBShortStop It is very strange, first make sure that there is no space in your working directory second check your python version in cmd with python --version. Are you using python 3.5? Your error is about not finding the python36.lib which is for Python 3.6. Try with the latest version of dlib like 19.7 and make sure about the version of python (boost, python and MSVC must be on the same architecture like X64 or X86 before compiling dlib).

@helenzusa1

This comment has been minimized.

Show comment
Hide comment
@helenzusa1

helenzusa1 Feb 18, 2018

I just checked, it's windows 10, 64 bits X64-based processor

helenzusa1 commented Feb 18, 2018

I just checked, it's windows 10, 64 bits X64-based processor

@davisking

This comment has been minimized.

Show comment
Hide comment
@davisking

davisking Feb 18, 2018

I don't know, you have a broken visual studio install somehow. Reinstall visual C++.

davisking commented Feb 18, 2018

I don't know, you have a broken visual studio install somehow. Reinstall visual C++.

@helenzusa1

This comment has been minimized.

Show comment
Hide comment
@helenzusa1

helenzusa1 Feb 18, 2018

I don't know why it always 'Using cached dlib-19.9.0.tar.gz' even though I deleted the dlib-19.9.0.tar.gz from C:\users\owner folder, I left untared dlib-19_9_0 folder, so I could edit some lines in setup.py, sources, egg_info.

helenzusa1 commented Feb 18, 2018

I don't know why it always 'Using cached dlib-19.9.0.tar.gz' even though I deleted the dlib-19.9.0.tar.gz from C:\users\owner folder, I left untared dlib-19_9_0 folder, so I could edit some lines in setup.py, sources, egg_info.

@helenzusa1

This comment has been minimized.

Show comment
Hide comment
@helenzusa1

helenzusa1 Feb 18, 2018

when I initially installed visual studio, I didn't add any work loads, I'm adding now including visual C++, see what happens.

helenzusa1 commented Feb 18, 2018

when I initially installed visual studio, I didn't add any work loads, I'm adding now including visual C++, see what happens.

@davisking

This comment has been minimized.

Show comment
Hide comment
@davisking

davisking Feb 18, 2018

davisking commented Feb 18, 2018

@helenzusa1

This comment has been minimized.

Show comment
Hide comment
@helenzusa1

helenzusa1 Feb 18, 2018

Hey @davisking good news, after I added visual C++, I successfully installed dlib and face_recognition, I could do python import face_recognition. Thanks for your great help.

(C:\Users\Owner\Anaconda2) C:\Users\Owner>activate tensorflow

(tensorflow) C:\Users\Owner>pip install dlib
Collecting dlib
Using cached dlib-19.9.0.tar.gz
Building wheels for collected packages: dlib
Running setup.py bdist_wheel for dlib ... done
Stored in directory: C:\Users\Owner\AppData\Local\pip\Cache\wheels\55\33\13\a6ebd55ad80a7d2944bebc962db6db4efdc7d3026adaf3b20d
Successfully built dlib
Installing collected packages: dlib
Successfully installed dlib-19.9.0
(tensorflow) C:\Users\Owner>pip install face_recognition-1.2.1-py2.py3-none-any.whl
Processing c:\users\owner\face_recognition-1.2.1-py2.py3-none-any.whl
Requirement already satisfied: dlib>=19.7 in c:\users\owner\anaconda2\envs\tensorflow\lib\site-packages (from face-recognition==1.2.1)
Requirement already satisfied: face-recognition-models>=0.3.0 in c:\users\owner\anaconda2\envs\tensorflow\lib\site-packages (from face-recognition==1.2.1)
Requirement already satisfied: numpy in c:\users\owner\anaconda2\envs\tensorflow\lib\site-packages (from face-recognition==1.2.1)
Requirement already satisfied: scipy>=0.17.0 in c:\users\owner\anaconda2\envs\tensorflow\lib\site-packages (from face-recognition==1.2.1)
Requirement already satisfied: Pillow in c:\users\owner\anaconda2\envs\tensorflow\lib\site-packages (from face-recognition==1.2.1)
Requirement already satisfied: Click>=6.0 in c:\users\owner\anaconda2\envs\tensorflow\lib\site-packages (from face-recognition==1.2.1)
Installing collected packages: face-recognition
Found existing installation: face-recognition 0.2.2
Uninstalling face-recognition-0.2.2:
Successfully uninstalled face-recognition-0.2.2
Successfully installed face-recognition-1.2.1

(tensorflow) C:\Users\Owner>python
Python 3.6.2 |Continuum Analytics, Inc.| (default, Jul 20 2017, 12:30:02) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

import face_recognition
quit()

helenzusa1 commented Feb 18, 2018

Hey @davisking good news, after I added visual C++, I successfully installed dlib and face_recognition, I could do python import face_recognition. Thanks for your great help.

(C:\Users\Owner\Anaconda2) C:\Users\Owner>activate tensorflow

(tensorflow) C:\Users\Owner>pip install dlib
Collecting dlib
Using cached dlib-19.9.0.tar.gz
Building wheels for collected packages: dlib
Running setup.py bdist_wheel for dlib ... done
Stored in directory: C:\Users\Owner\AppData\Local\pip\Cache\wheels\55\33\13\a6ebd55ad80a7d2944bebc962db6db4efdc7d3026adaf3b20d
Successfully built dlib
Installing collected packages: dlib
Successfully installed dlib-19.9.0
(tensorflow) C:\Users\Owner>pip install face_recognition-1.2.1-py2.py3-none-any.whl
Processing c:\users\owner\face_recognition-1.2.1-py2.py3-none-any.whl
Requirement already satisfied: dlib>=19.7 in c:\users\owner\anaconda2\envs\tensorflow\lib\site-packages (from face-recognition==1.2.1)
Requirement already satisfied: face-recognition-models>=0.3.0 in c:\users\owner\anaconda2\envs\tensorflow\lib\site-packages (from face-recognition==1.2.1)
Requirement already satisfied: numpy in c:\users\owner\anaconda2\envs\tensorflow\lib\site-packages (from face-recognition==1.2.1)
Requirement already satisfied: scipy>=0.17.0 in c:\users\owner\anaconda2\envs\tensorflow\lib\site-packages (from face-recognition==1.2.1)
Requirement already satisfied: Pillow in c:\users\owner\anaconda2\envs\tensorflow\lib\site-packages (from face-recognition==1.2.1)
Requirement already satisfied: Click>=6.0 in c:\users\owner\anaconda2\envs\tensorflow\lib\site-packages (from face-recognition==1.2.1)
Installing collected packages: face-recognition
Found existing installation: face-recognition 0.2.2
Uninstalling face-recognition-0.2.2:
Successfully uninstalled face-recognition-0.2.2
Successfully installed face-recognition-1.2.1

(tensorflow) C:\Users\Owner>python
Python 3.6.2 |Continuum Analytics, Inc.| (default, Jul 20 2017, 12:30:02) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

import face_recognition
quit()

@helenzusa1

This comment has been minimized.

Show comment
Hide comment
@helenzusa1

helenzusa1 Feb 18, 2018

Hi, @masoudr , after I resintalled visual C++, I tried bootstrp, it worked as well. Thanks for your great information.

helenzusa1 commented Feb 18, 2018

Hi, @masoudr , after I resintalled visual C++, I tried bootstrp, it worked as well. Thanks for your great information.

@pirumpi

This comment has been minimized.

Show comment
Hide comment
@pirumpi

pirumpi Feb 28, 2018

You don't have to install dlib from source, just use anaconda

conda install -c conda-forge dlib=19.4

pirumpi commented Feb 28, 2018

You don't have to install dlib from source, just use anaconda

conda install -c conda-forge dlib=19.4
@HDeed

This comment has been minimized.

Show comment
Hide comment
@HDeed

HDeed Mar 15, 2018

CMake Error at CMakeLists.txt:38 (message):
You have to use a version of Visual Studio that supports C++11. As of
December 2017, the only versions that have good enough C++11 support to
compile the dlib Pyhton API is a fully updated Visual Studio 2015 or a
fully updated Visual Studio 2017. Older versions of either of these
compilers have bad C++11 support and will fail to compile the Python
extension. SO UPDATE YOUR VISUAL STUDIO TO MAKE THIS ERROR GO AWAY

尽管提示的很清楚,我还是想问一句这个是因为我的vs版本问题导致的嘛,期待大神的回答

HDeed commented Mar 15, 2018

CMake Error at CMakeLists.txt:38 (message):
You have to use a version of Visual Studio that supports C++11. As of
December 2017, the only versions that have good enough C++11 support to
compile the dlib Pyhton API is a fully updated Visual Studio 2015 or a
fully updated Visual Studio 2017. Older versions of either of these
compilers have bad C++11 support and will fail to compile the Python
extension. SO UPDATE YOUR VISUAL STUDIO TO MAKE THIS ERROR GO AWAY

尽管提示的很清楚,我还是想问一句这个是因为我的vs版本问题导致的嘛,期待大神的回答

@rjtmehta99

This comment has been minimized.

Show comment
Hide comment
@rjtmehta99

rjtmehta99 Mar 24, 2018

Will face_recognition work on Windows 8.1 ?

rjtmehta99 commented Mar 24, 2018

Will face_recognition work on Windows 8.1 ?

@masoudr

This comment has been minimized.

Show comment
Hide comment
@masoudr

masoudr Mar 25, 2018

@rjtmehta99 Hi, Currently you can install dlib and face_recognition easily with pip, but if you want to build the latest version of dlib from source, you can install it without boost, so I think there is no problem to install them on Win8.

masoudr commented Mar 25, 2018

@rjtmehta99 Hi, Currently you can install dlib and face_recognition easily with pip, but if you want to build the latest version of dlib from source, you can install it without boost, so I think there is no problem to install them on Win8.

@rjtmehta99

This comment has been minimized.

Show comment
Hide comment
@rjtmehta99

rjtmehta99 Mar 25, 2018

@masoudr Thank You so much man !!

rjtmehta99 commented Mar 25, 2018

@masoudr Thank You so much man !!

@willshion

This comment has been minimized.

Show comment
Hide comment
@willshion

willshion Mar 26, 2018

PS C:\Users\wills\desktop\boost_1_66_0> pip install dlib
Collecting dlib
Using cached dlib-19.10.0.tar.gz
Building wheels for collected packages: dlib
Running setup.py bdist_wheel for dlib ... error
Failed building wheel for dlib
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib
Running setup.py install for dlib ... error
Exception:
Traceback (most recent call last):
File "c:\users\wills\appdata\local\programs\python\python36\lib\site-packages\pip\compat_init_.py", line 73, in console_to_str
return s.decode(sys.stdout.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 36: invalid continuation byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\users\wills\appdata\local\programs\python\python36\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\users\wills\appdata\local\programs\python\python36\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "c:\users\wills\appdata\local\programs\python\python36\lib\site-packages\pip\req\req_set.py", line 784, in install
**kwargs
File "c:\users\wills\appdata\local\programs\python\python36\lib\site-packages\pip\req\req_install.py", line 876, in install
spinner=spinner,
File "c:\users\wills\appdata\local\programs\python\python36\lib\site-packages\pip\utils_init_.py", line 676, in call_subprocess
line = console_to_str(proc.stdout.readline())
File "c:\users\wills\appdata\local\programs\python\python36\lib\site-packages\pip\compat_init_.py", line 75, in console_to_str
return s.decode('utf_8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 36: invalid continuation byte

fukk off the dlib pakage!
anything goes easy but dlib

willshion commented Mar 26, 2018

PS C:\Users\wills\desktop\boost_1_66_0> pip install dlib
Collecting dlib
Using cached dlib-19.10.0.tar.gz
Building wheels for collected packages: dlib
Running setup.py bdist_wheel for dlib ... error
Failed building wheel for dlib
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib
Running setup.py install for dlib ... error
Exception:
Traceback (most recent call last):
File "c:\users\wills\appdata\local\programs\python\python36\lib\site-packages\pip\compat_init_.py", line 73, in console_to_str
return s.decode(sys.stdout.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 36: invalid continuation byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\users\wills\appdata\local\programs\python\python36\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\users\wills\appdata\local\programs\python\python36\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "c:\users\wills\appdata\local\programs\python\python36\lib\site-packages\pip\req\req_set.py", line 784, in install
**kwargs
File "c:\users\wills\appdata\local\programs\python\python36\lib\site-packages\pip\req\req_install.py", line 876, in install
spinner=spinner,
File "c:\users\wills\appdata\local\programs\python\python36\lib\site-packages\pip\utils_init_.py", line 676, in call_subprocess
line = console_to_str(proc.stdout.readline())
File "c:\users\wills\appdata\local\programs\python\python36\lib\site-packages\pip\compat_init_.py", line 75, in console_to_str
return s.decode('utf_8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 36: invalid continuation byte

fukk off the dlib pakage!
anything goes easy but dlib

@abhishekbhandari22

This comment has been minimized.

Show comment
Hide comment
@abhishekbhandari22

abhishekbhandari22 Apr 7, 2018

Hey, I guys I just installed face_recognition and dlib. I am using jupyter notebook, anaconda, windows 10 and python 3.6
These are the steps I followed:

  1. Download the Visual studio 15 community and don't forget to check visual c++ compiler for installation.
  2. pip install dlib
  3. pip install face_recognition

That's all I needed to import face_recognition in my jupyter notebook.

abhishekbhandari22 commented Apr 7, 2018

Hey, I guys I just installed face_recognition and dlib. I am using jupyter notebook, anaconda, windows 10 and python 3.6
These are the steps I followed:

  1. Download the Visual studio 15 community and don't forget to check visual c++ compiler for installation.
  2. pip install dlib
  3. pip install face_recognition

That's all I needed to import face_recognition in my jupyter notebook.

@zubairahmed-ai

This comment has been minimized.

Show comment
Hide comment
@zubairahmed-ai

zubairahmed-ai Apr 19, 2018

Just installed dlib on Windows 10 64-bit following install instructions of CMAKE and compiling dlib https://github.com/davisking/dlib no need to do pip install dlib

zubairahmed-ai commented Apr 19, 2018

Just installed dlib on Windows 10 64-bit following install instructions of CMAKE and compiling dlib https://github.com/davisking/dlib no need to do pip install dlib

@vamzii

This comment has been minimized.

Show comment
Hide comment
@vamzii

vamzii Apr 30, 2018

directly download the whl file and install it using the command
pip install *.whl from command prompt
https://www.youtube.com/watch?v=KuVT3YYxFrU

vamzii commented Apr 30, 2018

directly download the whl file and install it using the command
pip install *.whl from command prompt
https://www.youtube.com/watch?v=KuVT3YYxFrU

@akhilkathi97

This comment has been minimized.

Show comment
Hide comment
@akhilkathi97

akhilkathi97 May 2, 2018

@TheDogeOfTheInternet how did you install Boost? with respect to your 1st comment.

akhilkathi97 commented May 2, 2018

@TheDogeOfTheInternet how did you install Boost? with respect to your 1st comment.

@davisking

This comment has been minimized.

Show comment
Hide comment
@davisking

davisking May 2, 2018

davisking commented May 2, 2018

@akhilkathi97

This comment has been minimized.

Show comment
Hide comment

akhilkathi97 commented May 2, 2018

@masoudr

This comment has been minimized.

Show comment
Hide comment
@masoudr

masoudr May 2, 2018

First post updated to avoid confusion to install the new version.

masoudr commented May 2, 2018

First post updated to avoid confusion to install the new version.

@llrraa

This comment has been minimized.

Show comment
Hide comment
@llrraa

llrraa May 7, 2018

Hey, I guys I just installed face_recognition and dlib. I am using windows 7 and python 3.6
These are the steps I followed:

pip install dlib==19.8.1
pip install face_recognition

very easy. No other tools needed.
python 3.6 is needed by dlib>=19.7.
For future newer dlib, you may visit https://pypi.org/project/dlib/#history to look for a newer version which contains the whl file, such as https://pypi.org/project/dlib/19.8.1/#files

llrraa commented May 7, 2018

Hey, I guys I just installed face_recognition and dlib. I am using windows 7 and python 3.6
These are the steps I followed:

pip install dlib==19.8.1
pip install face_recognition

very easy. No other tools needed.
python 3.6 is needed by dlib>=19.7.
For future newer dlib, you may visit https://pypi.org/project/dlib/#history to look for a newer version which contains the whl file, such as https://pypi.org/project/dlib/19.8.1/#files

@YakshThakar

This comment has been minimized.

Show comment
Hide comment
@YakshThakar

YakshThakar May 31, 2018

for installing in windows 10 or 8 or 7 it works fine!!
Follow the link for proper installing
https://github.com/YakshThakar/Face-Recognition-API-for-Windows-10

YakshThakar commented May 31, 2018

for installing in windows 10 or 8 or 7 it works fine!!
Follow the link for proper installing
https://github.com/YakshThakar/Face-Recognition-API-for-Windows-10

@Anveena

This comment has been minimized.

Show comment
Hide comment
@Anveena

Anveena Jul 17, 2018

hey,I think this link will be fine to get a higher speed. http://dlib.net/faq.html#Whyisdlibslow
Finally, you can enable either SSE4 or AVX instruction use. These will make certain operations much faster (e.g. face detection). You do this using CMake's cmake-gui tool. For example, if you execute these commands you will get the cmake-gui screen:

Anveena commented Jul 17, 2018

hey,I think this link will be fine to get a higher speed. http://dlib.net/faq.html#Whyisdlibslow
Finally, you can enable either SSE4 or AVX instruction use. These will make certain operations much faster (e.g. face detection). You do this using CMake's cmake-gui tool. For example, if you execute these commands you will get the cmake-gui screen:

@ramisha93

This comment has been minimized.

Show comment
Hide comment
@ramisha93

ramisha93 Aug 6, 2018

No need of visual studio , boost to install on windows. Just download latest .whl file from respective website https://pypi.org/simple/dlib/ and https://files.pythonhosted.org/packages/28/10/f153bbbc218fc169768aa1c02f2e9178e9241e4af8da56289bdca2c0c217/face_recognition-1.2.2-py2.py3-none-any.whl
Download and place it on python directory scrpit/
pip install dlib-19.8.1-cp36-cp36m-win_amd64.whl
pip install face_recognition-1.2.2-py2.py3-none-any.whl

ramisha93 commented Aug 6, 2018

No need of visual studio , boost to install on windows. Just download latest .whl file from respective website https://pypi.org/simple/dlib/ and https://files.pythonhosted.org/packages/28/10/f153bbbc218fc169768aa1c02f2e9178e9241e4af8da56289bdca2c0c217/face_recognition-1.2.2-py2.py3-none-any.whl
Download and place it on python directory scrpit/
pip install dlib-19.8.1-cp36-cp36m-win_amd64.whl
pip install face_recognition-1.2.2-py2.py3-none-any.whl

@geekwhy

This comment has been minimized.

Show comment
Hide comment
@geekwhy

geekwhy Aug 12, 2018

In fact,dlib still can't be complied by vs2017, if you want to complie it by yourself, please use vs2015 or other lower version to complie dlib on windows.

geekwhy commented Aug 12, 2018

In fact,dlib still can't be complied by vs2017, if you want to complie it by yourself, please use vs2015 or other lower version to complie dlib on windows.

@davisking

This comment has been minimized.

Show comment
Hide comment
@davisking

davisking Aug 12, 2018

davisking commented Aug 12, 2018

@kevinisbest

This comment has been minimized.

Show comment
Hide comment
@kevinisbest

kevinisbest Aug 18, 2018

Hi everyone, I also had same problem of installing dlib on Windows 10 earlier, and like @ramisha93 said, no need of visual studio and boost, also similar like @llrraa's steps.

Here are my steps:

  1. Go to Links for dlib download the dlib whl (for me, I download dlib-19.8.1-cp36-cp36m-win_amd64.whl)

  2. Use cmd to the whl directory

  3. And pip install whl_name.whl
    (pip install dlib-19.8.1-cp36-cp36m-win_amd64.whl for me)

  4. Then you can pip install face_recognition

It works for me!

kevinisbest commented Aug 18, 2018

Hi everyone, I also had same problem of installing dlib on Windows 10 earlier, and like @ramisha93 said, no need of visual studio and boost, also similar like @llrraa's steps.

Here are my steps:

  1. Go to Links for dlib download the dlib whl (for me, I download dlib-19.8.1-cp36-cp36m-win_amd64.whl)

  2. Use cmd to the whl directory

  3. And pip install whl_name.whl
    (pip install dlib-19.8.1-cp36-cp36m-win_amd64.whl for me)

  4. Then you can pip install face_recognition

It works for me!

@shahriarabdullah

This comment has been minimized.

Show comment
Hide comment
@shahriarabdullah

shahriarabdullah Aug 23, 2018

I'm facing the following errors. What can be a possible solution for this? I've CMake installed.
e1
e2

shahriarabdullah commented Aug 23, 2018

I'm facing the following errors. What can be a possible solution for this? I've CMake installed.
e1
e2

@owaisofficial

This comment has been minimized.

Show comment
Hide comment
@owaisofficial

owaisofficial Aug 28, 2018

Can anybody give a link of youtube how to install dlib and face_recognition
pip install dlib and then pip install face_recognition
Could not understand how to install above mentioned programs in windows. i have downloaded it but dont know how to install them. please help me out. thanks

owaisofficial commented Aug 28, 2018

Can anybody give a link of youtube how to install dlib and face_recognition
pip install dlib and then pip install face_recognition
Could not understand how to install above mentioned programs in windows. i have downloaded it but dont know how to install them. please help me out. thanks

@llrraa

This comment has been minimized.

Show comment
Hide comment
@llrraa

llrraa Sep 4, 2018

@shahriarabdullah
Hey, I guys I just installed face_recognition and dlib. I am using windows 7 and python 3.6
These are the steps I followed:

pip install dlib==19.8.1
pip install face_recognition

very easy. No other tools needed.
python 3.6 is needed by dlib>=19.7.
For future newer dlib, you may visit https://pypi.org/project/dlib/#history to look for a newer version which contains the whl file, such as https://pypi.org/project/dlib/19.8.1/#files

llrraa commented Sep 4, 2018

@shahriarabdullah
Hey, I guys I just installed face_recognition and dlib. I am using windows 7 and python 3.6
These are the steps I followed:

pip install dlib==19.8.1
pip install face_recognition

very easy. No other tools needed.
python 3.6 is needed by dlib>=19.7.
For future newer dlib, you may visit https://pypi.org/project/dlib/#history to look for a newer version which contains the whl file, such as https://pypi.org/project/dlib/19.8.1/#files

@davisking

This comment has been minimized.

Show comment
Hide comment
@davisking

davisking Sep 4, 2018

davisking commented Sep 4, 2018

@llrraa

This comment has been minimized.

Show comment
Hide comment
@llrraa

llrraa Sep 4, 2018

@davisking I'm sorry. Someone told me that. Maybe other versions of
python is ok also.

llrraa commented Sep 4, 2018

@davisking I'm sorry. Someone told me that. Maybe other versions of
python is ok also.

@llrraa

This comment has been minimized.

Show comment
Hide comment
@llrraa

llrraa commented Sep 4, 2018

@AnasKamali

This comment has been minimized.

Show comment
Hide comment
@AnasKamali

AnasKamali Sep 6, 2018

i am facing problem here

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

Collecting dlib
Using cached https://files.pythonhosted.org/packages/df/aa/6a9bb2a763107bb2606d6ee1aa65fcd3b51375a9ef6436e9c9280b0dd63c/dlib-19.15.0.tar.gz
Building wheels for collected packages: dlib
Running setup.py bdist_wheel for dlib ... error
Complete output from command f:\anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\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\HOME\AppData\Local\Temp\pip-wheel-vxkiejv_ --python-tag cp35:
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.5.2 |Anaconda 4.1.1 (64-bit)| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\build\lib.win-amd64-3.5 -DPYTHON_EXECUTABLE=f:\anaconda3\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\build\lib.win-amd64-3.5 -A x64'
-- Building for: NMake Makefiles
CMake Error in CMakeLists.txt:
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/HOME/AppData/Local/Temp/pip-install-ml6s16mn/dlib/build/temp.win-amd64-3.5/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\setup.py", line 257, in
'Topic :: Software Development',
File "f:\anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "f:\anaconda3\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "f:\anaconda3\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "f:\anaconda3\lib\site-packages\wheel\bdist_wheel.py", line 179, in run
self.run_command('build')
File "f:\anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "f:\anaconda3\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "f:\anaconda3\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "f:\anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "f:\anaconda3\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\setup.py", line 133, in run
self.build_extension(ext)
File "C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\setup.py", line 170, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "f:\anaconda3\lib\subprocess.py", line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\tools\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\build\lib.win-amd64-3.5', '-DPYTHON_EXECUTABLE=f:\anaconda3\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\build\lib.win-amd64-3.5', '-A', 'x64']' returned non-zero exit status 1


Failed building wheel for dlib
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib
Running setup.py install for dlib ... error
Complete output from command f:\anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\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\HOME\AppData\Local\Temp\pip-record-xfibkqpc\install-record.txt --single-version-externally-managed --compile:
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.5.2 |Anaconda 4.1.1 (64-bit)| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\build\lib.win-amd64-3.5 -DPYTHON_EXECUTABLE=f:\anaconda3\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\build\lib.win-amd64-3.5 -A x64'
-- Building for: NMake Makefiles
CMake Error in CMakeLists.txt:
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/HOME/AppData/Local/Temp/pip-install-ml6s16mn/dlib/build/temp.win-amd64-3.5/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\setup.py", line 257, in <module>
    'Topic :: Software Development',
  File "f:\anaconda3\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "f:\anaconda3\lib\distutils\dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "f:\anaconda3\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "f:\anaconda3\lib\site-packages\setuptools-23.0.0-py3.5.egg\setuptools\command\install.py", line 61, in run
  File "f:\anaconda3\lib\distutils\command\install.py", line 539, in run
    self.run_command('build')
  File "f:\anaconda3\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "f:\anaconda3\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "f:\anaconda3\lib\distutils\command\build.py", line 135, in run
    self.run_command(cmd_name)
  File "f:\anaconda3\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "f:\anaconda3\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\setup.py", line 133, in run
    self.build_extension(ext)
  File "C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\setup.py", line 170, in build_extension
    subprocess.check_call(cmake_setup, cwd=build_folder)
  File "f:\anaconda3\lib\subprocess.py", line 581, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\HOME\\AppData\\Local\\Temp\\pip-install-ml6s16mn\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\HOME\\AppData\\Local\\Temp\\pip-install-ml6s16mn\\dlib\\build\\lib.win-amd64-3.5', '-DPYTHON_EXECUTABLE=f:\\anaconda3\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\HOME\\AppData\\Local\\Temp\\pip-install-ml6s16mn\\dlib\\build\\lib.win-amd64-3.5', '-A', 'x64']' returned non-zero exit status 1

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

Command "f:\anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\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\HOME\AppData\Local\Temp\pip-record-xfibkqpc\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\

AnasKamali commented Sep 6, 2018

i am facing problem here

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

Collecting dlib
Using cached https://files.pythonhosted.org/packages/df/aa/6a9bb2a763107bb2606d6ee1aa65fcd3b51375a9ef6436e9c9280b0dd63c/dlib-19.15.0.tar.gz
Building wheels for collected packages: dlib
Running setup.py bdist_wheel for dlib ... error
Complete output from command f:\anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\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\HOME\AppData\Local\Temp\pip-wheel-vxkiejv_ --python-tag cp35:
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.5.2 |Anaconda 4.1.1 (64-bit)| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\build\lib.win-amd64-3.5 -DPYTHON_EXECUTABLE=f:\anaconda3\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\build\lib.win-amd64-3.5 -A x64'
-- Building for: NMake Makefiles
CMake Error in CMakeLists.txt:
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/HOME/AppData/Local/Temp/pip-install-ml6s16mn/dlib/build/temp.win-amd64-3.5/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\setup.py", line 257, in
'Topic :: Software Development',
File "f:\anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "f:\anaconda3\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "f:\anaconda3\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "f:\anaconda3\lib\site-packages\wheel\bdist_wheel.py", line 179, in run
self.run_command('build')
File "f:\anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "f:\anaconda3\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "f:\anaconda3\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "f:\anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "f:\anaconda3\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\setup.py", line 133, in run
self.build_extension(ext)
File "C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\setup.py", line 170, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "f:\anaconda3\lib\subprocess.py", line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\tools\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\build\lib.win-amd64-3.5', '-DPYTHON_EXECUTABLE=f:\anaconda3\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\build\lib.win-amd64-3.5', '-A', 'x64']' returned non-zero exit status 1


Failed building wheel for dlib
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib
Running setup.py install for dlib ... error
Complete output from command f:\anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\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\HOME\AppData\Local\Temp\pip-record-xfibkqpc\install-record.txt --single-version-externally-managed --compile:
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.5.2 |Anaconda 4.1.1 (64-bit)| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\build\lib.win-amd64-3.5 -DPYTHON_EXECUTABLE=f:\anaconda3\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\build\lib.win-amd64-3.5 -A x64'
-- Building for: NMake Makefiles
CMake Error in CMakeLists.txt:
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/HOME/AppData/Local/Temp/pip-install-ml6s16mn/dlib/build/temp.win-amd64-3.5/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\setup.py", line 257, in <module>
    'Topic :: Software Development',
  File "f:\anaconda3\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "f:\anaconda3\lib\distutils\dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "f:\anaconda3\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "f:\anaconda3\lib\site-packages\setuptools-23.0.0-py3.5.egg\setuptools\command\install.py", line 61, in run
  File "f:\anaconda3\lib\distutils\command\install.py", line 539, in run
    self.run_command('build')
  File "f:\anaconda3\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "f:\anaconda3\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "f:\anaconda3\lib\distutils\command\build.py", line 135, in run
    self.run_command(cmd_name)
  File "f:\anaconda3\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "f:\anaconda3\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\setup.py", line 133, in run
    self.build_extension(ext)
  File "C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\setup.py", line 170, in build_extension
    subprocess.check_call(cmake_setup, cwd=build_folder)
  File "f:\anaconda3\lib\subprocess.py", line 581, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\HOME\\AppData\\Local\\Temp\\pip-install-ml6s16mn\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\HOME\\AppData\\Local\\Temp\\pip-install-ml6s16mn\\dlib\\build\\lib.win-amd64-3.5', '-DPYTHON_EXECUTABLE=f:\\anaconda3\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\HOME\\AppData\\Local\\Temp\\pip-install-ml6s16mn\\dlib\\build\\lib.win-amd64-3.5', '-A', 'x64']' returned non-zero exit status 1

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

Command "f:\anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\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\HOME\AppData\Local\Temp\pip-record-xfibkqpc\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\HOME\AppData\Local\Temp\pip-install-ml6s16mn\dlib\

@masoudr

This comment has been minimized.

Show comment
Hide comment
@masoudr

masoudr Sep 6, 2018

@AnasKamali Please post the exact command you enter and format the code with a quote.
Which kind of OS are you using? what version of python are you using? and what is your architecture? X86 or X64?

masoudr commented Sep 6, 2018

@AnasKamali Please post the exact command you enter and format the code with a quote.
Which kind of OS are you using? what version of python are you using? and what is your architecture? X86 or X64?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment