0

i am using python python 3.7.4 amb64 version and i am trying to install dlib package to run an example project. pip install dlib was asking for CMake and i have installed it, also searched for slimier questions and tried all the methods. dlib installation on Windows 10.

still getting this error about C compiler identification is unknown, The CXX compiler identification is unknown, CMake Error in CMakeLists.txt:, No CMAKE_C_COMPILER could be found., No CMAKE_CXX_COMPILER could be found.

full error goes like this.. any idea why is this happening?

enter image description here

enter image description here

Botje
  • 26,269
  • 3
  • 31
  • 41
Eshaka
  • 974
  • 1
  • 14
  • 38
  • You do not have a C or C++ compiler installed. Did you install visual studio and/or the visual studio build tools? – Botje Sep 16 '19 at 08:42
  • @Botje yes i have installed VS latest version and the C,C++ is working properly in it – Eshaka Sep 16 '19 at 10:09
  • do i need to install visual studio build tools separately – Eshaka Sep 16 '19 at 10:09
  • Is your cmake version recent enough to figure out the location of visual studio? Try cmaking a simple C++ project. – Botje Sep 16 '19 at 10:54
  • @Eshaka I have a Mac, and had this problem too. All I needed to do is make sure the compiler path was added to PATH. Hope this helps. – Souradeep Sinha Mar 20 '20 at 02:48

2 Answers2

1

I was stuck in the frustrating loop of trying to resolve this error for a few days. There are no real answers out there that offer definitive solutions.

The error has got nothing to do with a python version or a cmake version or dlib's installation method(building from source/pip).

I was able to get it resolved by installing the Windows SDK (windows 11 sdk in my case.) screenshot here

Also visible in the screenshot, c++ cmake tools for windows is also needed for dlib to compile.

Sunderam Dubey
  • 1
  • 11
  • 20
  • 40
0

I had the same error. I installed c++ for Visual studio 19 but did not installed the SDK. After installing the SDK then "pip install dlib" works for me.

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
Toni
  • 1
  • 1