Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to fix CMake Error in CMakeLists.txt: Generator NMake Makefiles does not support platform specification, but platform x64 was specified

Tags:

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

like image 324
Owase Sayyad Avatar asked Feb 05 '18 14:02

Owase Sayyad


People also ask

What is CMake generator?

A CMake Generator is responsible for writing the input files for a native build system. Exactly one of the CMake Generators must be selected for a build tree to determine what native build system is to be used.


1 Answers

I am on windows 10, python 3.5, pip 10
dlib didn't work even after installing cmake. Solution :

  • Add cmake into PATH(C:\Program Files\CMake\bin)
  • Then install using pip:

    pip install dlib==19.4 

Works like a charm.

Edit:

After windows October update, the above method works, but sometimes there are errors like boost error and cmake incompatible. so,

  • Download and install CMake msi
  • Add cmake into PATH(C:\Program Files\CMake\bin)
  • Restart Windows
  • pip install dlib 

    or

    pip install dlib==19.4 
like image 104
ASHu2 Avatar answered Sep 19 '22 12:09

ASHu2