I want to install dlib using pip install dlib using cmd in windows 10 But it is showing following three errors: 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
INFORMATION: pip 9.0.1 from d:\python36\lib\site-packages (python 3.6) cmake 0.9.0 windows 10 pro(64-bit) Version: 10.0.16299 Build 16299
I am on windows 10, python 3.5, pip 10
dlib didn't work even after installing cmake. Solution :
Then install using
pip
:Works like a charm.
Edit:
After windows October update, the above method works, but sometimes there are errors like
boost error
andcmake incompatible
. so,or
First of all, delete CMakeCache.txt file. Later, just execute inside dlib-xx/build the command below:
If you have more problems with CMAKE_C_COMPILER and CMAKE_CXX_COMPILER, you will have to install MinGW and add to the enviroment variable the path /bin of MinGW.
And if you don't have installed Visual Studio, you would to resolve future problems
The easiest way is to install MS Visual Studio Community Edition, and select Visual C++ (install anything else you want but they are all optional except C++). This will install CMake and the correct compiler and libs in the correct locations.
If you get an error, post back here. You are probably missing a dependency or ENV variable.
you can also go this link (dlib.whl) and download .whl version of dlib and use this command to install it
but you should replace name of the file in above command with any file that you have downloaded
I had the same problem. Installing
dlib
from.whl
worked.See this post: https://stackoverflow.com/a/49538054/9524424
I have just encountered the same problem yesterday and looked up many resources. And at last I solved it by installing Visual Studio 2017, choosing C++-related component, because it needs the C++ compiler to build the dlib.