0

after watching a tutorial on facial recognition with Python, I managed to write w working program on my Linux laptop. Today I was trying to do the same thing on my Windows 10 PC but I keep getting errors when trying to install DLib from the source code using:

python setup.py install

The error message that I get goes like this:

running install
running bdist_egg
running egg_info
writing dlib.egg-info\PKG-INFO
writing dependency_links to dlib.egg-info\dependency_links.txt
writing top-level names to dlib.egg-info\top_level.txt
package init file 'dlib\__init__.py' not found (or not a regular file)
reading manifest file 'dlib.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'tools\python\build*'
no previously-included directories found matching 'dlib\test'
writing manifest file 'dlib.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
running build_ext
Building extension for Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:21:23) [MSC v.1916 32 bit (Intel)]
Invoking CMake setup: 'cmake D:\Pyton_Pliki\facial_recognition\Lib\site-packages\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\Pyton_Pliki\facial_recognition\Lib\site-packages\build\lib.win32-3.8 -DPYTHON_EXECUTABLE=C:\Users\kubus\AppData\Local\Programs\Python\Python38-32\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=D:\Pyton_Pliki\facial_recognition\Lib\site-packages\build\lib.win32-3.8'
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version  to target Windows 10.0.18362.
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:3 (project):
  No CMAKE_C_COMPILER could be found.

I have VS 16 2019 installed and I installed CMake both using the Windows installer and from the VS tools. I know that the problem is with the compiler but how do I install one and point CMake to it?

1

1 Answer 1

1

This link helped:

learn.microsoft.com/en-us/cpp/build/vscpp-step-0-installation

I followed the process of installation of C++ compiler using Visual Studio which was described in detail in this article. After that I run python setup.py install and everything worked fine.

Thanks to Stark!

Sign up to request clarification or add additional context in comments.

1 Comment

@squareskittles I edited my answer so it provides more info. Hope it's ok now!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.