Ask Your Question
0

OpenCV setup issue with dlib build on windows

asked 2019-05-19 13:12:59 -0600

Ivan Zhidov gravatar image

On windows 10, dlib fails to build due to cmake error, please let me know how to resolve it

Building extension for Python 3.7.3 (default, Mar 27 2019, 17:13:21) [MSC v.1915 64 bit (AMD64)] Invoking CMake setup: 'cmake C:\Users\Ivan\AppData\Local\Temp\pip-install-t_dopc7a\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Ivan\AppData\Local\Temp\pip-install-t_dopc7a\dlib\build\lib.win-amd64-3.7 -DPYTHON_EXECUTABLE=C:\Users\Ivan\Anaconda3\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Ivan\AppData\Local\Temp\pip-install-t_dopc7a\dlib\build\lib.win-amd64-3.7 -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!

edit retag flag offensive close merge delete

Comments

i do not think, this is related to opencv at all.

(unfortunately, we cannot help with issues building dlib's python bindings, that's far off !)

berak gravatar imageberak ( 2019-05-19 13:27:42 -0600 )edit
2

Its part of OpenCV course setup that Satya Mallick is teaching tomorrow at Embedded Vision Summit so he told me to post it here.

Ivan Zhidov gravatar imageIvan Zhidov ( 2019-05-19 14:36:00 -0600 )edit

ok,ok, apologies, then ;)

Its part of OpenCV course setup.

do you happen to have a link ? probably, having more context is helpful here !

berak gravatar imageberak ( 2019-05-19 14:56:22 -0600 )edit
1

https://www.embedded-vision.com/summi...

as part of setup the instructions say to build dlib

pip install dlib

it blows up with above error, everything else appears to work fine

Ivan Zhidov gravatar imageIvan Zhidov ( 2019-05-19 15:15:17 -0600 )edit
1

ok, i could reproduce it.

mainly it means, it could not find a proper c++ compiler installed. to build the dlib src code & the wrappers. (easy on linux, where g++ comes for free, but on win it means, you need visual studio or similar installed)

berak gravatar imageberak ( 2019-05-19 15:53:41 -0600 )edit

3 answers

Sort by ยป oldest newest most voted
0

answered 2019-05-19 21:57:59 -0600

supra56 gravatar image

Try this:

pip install dlib==19.8.1
edit flag offensive delete link more

Comments

same result

Ivan Zhidov gravatar imageIvan Zhidov ( 2019-05-20 01:21:19 -0600 )edit
0

answered 2020-05-14 03:40:14 -0600

I successfully installed dlib 19.8.1 on Python 3.7 for windows 64bit using https://www.file-upload.com/qsd69ajuqr2i

edit flag offensive delete link more
0

answered 2019-05-19 17:06:52 -0600

berak gravatar image

updated 2019-05-19 17:11:49 -0600

there is no prebuilt windows version for the latest dlib version available via pip, so it tried to download the latest src, and failed building that, because you had no c++ compiler installed.

but you can try a not-so-recent version, like:

 pip install dlib=19.3.1

this should at least install a binary whl , which can be used "out-of-the-box".

edit flag offensive delete link more

Comments

Heres the result:`Installing collected packages: dlib Running setup.py install for dlib ... error Complete output from command C:\Users\Ivan\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\Users\Ivan\AppData\Local\Temp\pip-install-6duxc8da\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\Ivan\AppData\Local\Temp\pip-record-mj6phfue\install-record.txt --single-version-externally-managed --compile: running install running build Detected Python architecture: 64bit Detected platform: win32 Removing build directory C:\Users\Ivan\AppData\Local\Temp\pip-install-6duxc8da\dlib./tools/python/build Configuring cmake ...

Ivan Zhidov gravatar imageIvan Zhidov ( 2019-05-19 17:32:16 -0600 )edit

-- 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 C

Ivan Zhidov gravatar imageIvan Zhidov ( 2019-05-19 17:32:47 -0600 )edit

Make 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/Ivan/AppData/Local/Temp/pip-install-6duxc8da/dlib/tools/python/build/CMakeFiles

Ivan Zhidov gravatar imageIvan Zhidov ( 2019-05-19 17:33:18 -0600 )edit

For some reason it doesnt see cmake even though tis installed pip install cmake Requirement already satisfied: cmake in c:\users\ivan\anaconda3\lib\site-packages (3.13.3)

Ivan Zhidov gravatar imageIvan Zhidov ( 2019-05-19 17:34:10 -0600 )edit
1

imho, you should try to find a binary whl for this, not try with any "build from src" distribution.

and really, THIS IS OFF-TOPIC.

berak gravatar imageberak ( 2019-05-20 02:11:11 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-05-19 13:12:59 -0600

Seen: 4,990 times

Last updated: May 19 '19