hi,
I have windows 10 64 bit and i try and try to install dlib for python with this command:
python setup.py install
but i get error below:
running install
running bdist_egg
running build
Detected Python architecture: 32bit
Detected platform: win32
Removing build directory C:\UsersAvatar\Desktop\dlib-master./tools/python/build
Configuring cmake ...
-- Building for: Visual Studio 12 2013
-- The C compiler identification is MSVC 18.0.21005.1
-- The CXX compiler identification is MSVC 18.0.21005.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find Boost
-- Found PythonLibs: C:/Python27/libs/python27.lib (found suitable version "2.7.9+", minimum required is "2.6")
error: cmake configuration failed!
i install cmake GUI and dont know haow can i set it.
and i build from source with cmake command like in readme file:
mkdir build; cd build; cmake .. ; cmake --build .
at the end i say that, i want use dlib on python .
does anyone can help me???
Thanks a lot....
-- Could NOT find Boost
you should download and install boost
this is not a problem of dlib itself, please ask such questions on stackoverflow
I have the same problem, and I have installed boost according to their setup instructions.
http://dlib.net/faq.html#Whywon'tthePythonbindingscompilework
Thanks.
How do you actually install boost_python under windows?
I can't find anything about that.
My cmake is getting these errors:
Could not find the following static Boost libraries:
boost_python-py34
I have python 3.4.0 installed.
CMake should output some instructions that tell you what to do. There are also instructions on the boost website. Also, you can pip install dlib for the 64bit version of python 3 on windows. That's what I would do.
pip install also fails. After about 6 hours of following vague and contradicting boost installation manuals, endless errors, re-installs and whatnots, I've given up on getting DLIB python compiled. My hate towards boost is now intense and all consuming.
Yeah, it's annoying. Although I would place the blame for this on the
python community. Compiling python modules is an unmitigated cluster
fuck. There are hundreds of different possible python
configurations/environments that all require slightly different build
settings and are all incompatible with each other.
The pip install should work on windows. I uploaded a compiled binary for
dlib for the 64bit version of the new python 3 interpreter a while ago. It
should just install in a second. Although, maybe you don't have exactly
that specific version of python and pip thinks it therefore needs to
compile a new one.
I uploaded a compiled binary for dlib for the 64bit version of the new python 3 interpreter a while ago
I haven't been able to find this. Pypi only has the source for 19.1.0; the releases for this repo are only the source. Where is the dlib binary?
Huh, yeah I don't see it on pypi either. I swear I uploaded it :/
I'll look into this tomorrow.
After some more snooping, I found it: https://pypi.python.org/pypi/dlib/18.17.100
That's the older one. I made one for the newer version of dlib (which isn't very different if you use only python). The upload to pypi must not have worked, apparently, and I didn't check since the upload didn't indicate any obvious failure.
Try "conda install -c menpo dlib"
conda install -c menpo dlib worked for me, however I had to downgrade python to version 3.5
I have been asked to download the dlib library on my windows system. I have followed the instructions given here: http://www.paulvangent.com/2016/08/05/emotion-recognition-using-facial-landmarks/
I have already downloaded nad install cmake, boost and Visual Studio. On the dlib folder
command prompt, on running "python setup.py install" I get the problem that you can see in the picture added.

I have python 3.6 with conda,
ok maybe the simple solution is downgrade python to version 3.5 and :
conda install -c menpo dlib
but how I can do that?
Thanks in advance
You don't have a C++ compiler installed. You need to select C++ when you install visual studio. Also, make sure to install visual studio 2015 because visual studio 2017 is buggy and won't compile C++11 code, which is a requirement to use dlib.
Thanks for your quick response davisking.
You are right, there was a problem with visual studio 2017 so I installed visual studio 2015 with c++ packs.
However now I have other problem:
http://imgur.com/5DkUTJE
Has you any idea how I can solved it?
Thanks in advance
That error message literally tells you what to do.
I followed that error message literally without luck. Finally I solved that problem downgrading python to version 3.5 and conda install -c menpo dlib. Thanks for the help :)
Try to install dlib.
Get cmake and boost by pip.
Already have Visual C++ Build Tools.
Windows 7 x64
Get this error
$ python -m pip install dlib
Collecting dlib
Using cached dlib-19.4.0.tar.gz
Installing collected packages: dlib
Running setup.py install for dlib: started
Running setup.py install for dlib: finished with status 'error'
Complete output from command C:\UsersAndreyAppData\Local\Programs\Python\P ython36\python.exe -u -c "import setuptools, tokenize;__file__='C:\cygwin64\tm p\pip-build-_6ur7d39\dlib\setup.py';f=getattr(tokenize, 'open', open)(__file_ _);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'e xec'))" install --record C:\cygwin64\tmp\pip-br460pmx-recordinstall-record.txt --single-version-externally-managed --compile:
running install
running build
Detected Python architecture: 64bit
Detected platform: win32
Configuring cmake ...
-- The C compiler identification is MSVC 19.0.23506.0
-- The CXX compiler identification is MSVC 19.0.23506.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Stu dio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Stu dio 14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual S tudio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual S tudio 14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at C:/Users/Andrey/AppData/Local/Programs/Python/Python36/Lib/ site-packages/cmake/data/share/cmake-3.8/Modules/FindBoost.cmake:765 (message):
Imported targets not available for Boost version
Call Stack (most recent call first):
C:/Users/Andrey/AppData/Local/Programs/Python/Python36/Lib/site-packages/c make/data/share/cmake-3.8/Modules/FindBoost.cmake:869 (_Boost_COMPONENT_DEPENDEN CIES)
C:/Users/Andrey/AppData/Local/Programs/Python/Python36/Lib/site-packages/c make/data/share/cmake-3.8/Modules/FindBoost.cmake:1472 (_Boost_MISSING_DEPENDENC IES)
C:/cygwin64/tmp/pip-build-_6ur7d39/dlib/dlib/cmake_utils/add_python_module :61 (FIND_PACKAGE)
CMakeLists.txt:6 (include)
CMake Warning at C:/Users/Andrey/AppData/Local/Programs/Python/Python36/Lib/ site-packages/cmake/data/share/cmake-3.8/Modules/FindBoost.cmake:1536 (message):
No header defined for python-py34; skipping header check
Call Stack (most recent call first):
C:/cygwin64/tmp/pip-build-_6ur7d39/dlib/dlib/cmake_utils/add_python_module :61 (FIND_PACKAGE)
CMakeLists.txt:6 (include)
-- Could NOT find Boost
CMake Warning at C:/Users/Andrey/AppData/Local/Programs/Python/Python36/Lib/ site-packages/cmake/data/share/cmake-3.8/Modules/FindBoost.cmake:765 (message):
Imported targets not available for Boost version
Call Stack (most recent call first):
C:/Users/Andrey/AppData/Local/Programs/Python/Python36/Lib/site-packages/c make/data/share/cmake-3.8/Modules/FindBoost.cmake:869 (_Boost_COMPONENT_DEPENDEN CIES)
C:/Users/Andrey/AppData/Local/Programs/Python/Python36/Lib/site-packages/c make/data/share/cmake-3.8/Modules/FindBoost.cmake:1472 (_Boost_MISSING_DEPENDENC IES)
C:/cygwin64/tmp/pip-build-_6ur7d39/dlib/dlib/cmake_utils/add_python_module :63 (FIND_PACKAGE)
CMakeLists.txt:6 (include)
CMake Warning at C:/Users/Andrey/AppData/Local/Programs/Python/Python36/Lib/ site-packages/cmake/data/share/cmake-3.8/Modules/FindBoost.cmake:1536 (message):
No header defined for python-py35; skipping header check
Call Stack (most recent call first):
C:/cygwin64/tmp/pip-build-_6ur7d39/dlib/dlib/cmake_utils/add_python_module :63 (FIND_PACKAGE)
CMakeLists.txt:6 (include)
-- Could NOT find Boost
CMake Warning at C:/Users/Andrey/AppData/Local/Programs/Python/Python36/Lib/ site-packages/cmake/data/share/cmake-3.8/Modules/FindBoost.cmake:765 (message):
Imported targets not available for Boost version
Call Stack (most recent call first):
C:/Users/Andrey/AppData/Local/Programs/Python/Python36/Lib/site-packages/c make/data/share/cmake-3.8/Modules/FindBoost.cmake:869 (_Boost_COMPONENT_DEPENDEN CIES)
C:/Users/Andrey/AppData/Local/Programs/Python/Python36/Lib/site-packages/c make/data/share/cmake-3.8/Modules/FindBoost.cmake:1472 (_Boost_MISSING_DEPENDENC IES)
C:/cygwin64/tmp/pip-build-_6ur7d39/dlib/dlib/cmake_utils/add_python_module :66 (FIND_PACKAGE)
CMakeLists.txt:6 (include)
CMake Warning at C:/Users/Andrey/AppData/Local/Programs/Python/Python36/Lib/ site-packages/cmake/data/share/cmake-3.8/Modules/FindBoost.cmake:1536 (message):
No header defined for python3; skipping header check
Call Stack (most recent call first):
C:/cygwin64/tmp/pip-build-_6ur7d39/dlib/dlib/cmake_utils/add_python_module :66 (FIND_PACKAGE)
CMakeLists.txt:6 (include)
-- Could NOT find Boost
CMake Warning at C:/Users/Andrey/AppData/Local/Programs/Python/Python36/Lib/ site-packages/cmake/data/share/cmake-3.8/Modules/FindBoost.cmake:765 (message):
Imported targets not available for Boost version
Call Stack (most recent call first):
C:/Users/Andrey/AppData/Local/Programs/Python/Python36/Lib/site-packages/c make/data/share/cmake-3.8/Modules/FindBoost.cmake:869 (_Boost_COMPONENT_DEPENDEN CIES)
C:/Users/Andrey/AppData/Local/Programs/Python/Python36/Lib/site-packages/c make/data/share/cmake-3.8/Modules/FindBoost.cmake:1472 (_Boost_MISSING_DEPENDENC IES)
C:/cygwin64/tmp/pip-build-_6ur7d39/dlib/dlib/cmake_utils/add_python_module :69 (FIND_PACKAGE)
CMakeLists.txt:6 (include)
-- Could NOT find Boost
-- Found PythonLibs: C:/Users/Andrey/AppData/Local/Programs/Python/Python36/ libs/python36.lib (found suitable version "3.6.1", minimum required is "3.4")
-- *********************** ********
-- We couldn't find the right version of boost python. If you installed boo st and you are still getting this error then you might have installed a version of boost that was compiled with a different version of visual studio than the on e you are using. So you have to make sure that the version of visual studio is the same version that was used to compile the copy of boost you are using.
-- Set the BOOST_ROOT and BOOST_LIBRARYDIR environment variables before run ning cmake.
-- E.g. Something like this:
-- set BOOST_ROOT=C:\local\boost_1_57_0
-- set BOOST_LIBRARYDIR=C:\local\boost_1_57_0\stage\lib
--
-- You will also likely need to compile boost yourself rather than using on e of the precompiled
-- windows binaries. Do this by going to the folder tools\build\ within bo ost and running
-- bootstrap.bat. Then run the command:
-- b2 install
-- And then add the output bin folder to your PATH. Usually this is the C: \boost-build-engine\bin
-- folder. Finally, go to the boost root and run a command like this:
-- b2 -a --with-python address-model=64 toolset=msvc runtime-link=static
-- When it completes, set BOOST_LIBRARYDIR equal to wherever b2 put the com piled libraries.
-- Note that you will need to set the address-model based on if you want a 32 or 64bit python library.
--
-- Next, when you invoke cmake to compile dlib you may have to use cmake's -G option to set the
-- 64 vs. 32bit mode of visual studio. Also, if you want a Python3 library you will need to
-- add -DPYTHON3=1. You do this with a statement like:
-- cmake -G "Visual Studio 12 2013 Win64" -DPYTHON3=1 ....\tools\python
-- Rather than:
-- cmake ....\tools\python
-- Which will build a 32bit Python2 module by default on most systems.
--
-- *********************** ********
CMake Error at C:/cygwin64/tmp/pip-build-_6ur7d39/dlib/dlib/cmake_utils/add_ python_module:116 (message):
Boost python library not found.
Call Stack (most recent call first):
CMakeLists.txt:6 (include)
-- Configuring incomplete, errors occurred!
See also "C:/cygwin64/tmp/pip-build-_6ur7d39/dlib/tools/python/build/CMakeFi les/CMakeOutput.log".
error: cmake configuration failed!
----------------------------------------
Command "C:\UsersAndreyAppData\Local\Programs\Python\Python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\cygwin64\tmp\pip-build-_6ur7d39\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:\cygwin64\tmp\pip-br460pmx-recordinstall-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\cygwin64\tmp\pip-build-_6ur7d39\dlib\
Try "conda install -c menpo dlib"
@rendicahya, would you mind to explain how and why does it work when pip install dlib doesn't? I mean: what else happens when I use conda instead of pip and what is menpo?
. After about 6 hours of following vague and contradicting boost installation manuals, endless errors, re-installs and whatnots, I've given up on getting DLIB python compiled. My hate towards boost is now intense and all consuming.
100% agreed.
Did you download boost from boost.org and follow the exact instructions shown in @hadaev8's post? The dlib output messages tell you what to type. They are the commands I use myself to install on Windows.
Also, yes, boost is difficult. Someone should switch dlib to pybind11 https://github.com/davisking/dlib/issues/293 and then boost won't be required :)
Although I should point out that a lot of the hate I get about boost is really due to python's incredibly horrible build and package management situation. The only reason pybind11 would be better is because it's header only and therefore you don't have to separately compile it against the correct version of python. For instance, if you have multiple versions of python installed, as many users do, you have to be sure you are compiling all extension modules against the version of python you actually use. Additionally, there are all these python repackagers cough anaconda cough that fuck up the pyhton interpreter's install by either removing important files like python development libraries/headers or by adding broken copies of standard system headers like modified X11 headers.
There are many other problems. And worse of all, I know about all these busted features of the python ecosystem because I'm inundated with people complaining about them :(
Really there needs to be a stable interface for building python extension modules. That's the root of this problem.
But in any case, those instructions posted in this github thread you are reading should work just fine if you are using a copy of python that you got from python.org. If it's some other repackaged copy of python then who knows.
This is tutorial to install dlib on windows 10: http://www.learnopencv.com/install-dlib-on-windows/. It works for me. Hope helpful!
Davis, I think it is better to add a note about windows boost pre-built binaries. I spent one day to find the problem. This dll file "boost_python3-vc140-mt-1_65_1.dll" depends still Python27.
Windows Boost binaries still have a bug :
https://github.com/boostorg/python/issues/129
You have to build Boost from source, don't use pre-built windows binaries of Boost.
Yes, I have a million notes that tell people to build boost themselves. I don't know how many more places I can say it.
I've run conda install -c conda-forge dlib=19.4 and it worked !
It's come to my attention that a lot of people are landing on this page when looking for instructions on installing dlib's python interface on windows. THE INSTRUCTIONS IN THIS ISSUE ARE OUTDATED, in particular, boost is no longer used. All you need to do is install CMake and Microsoft Visual C++. Then just pip install dlib. That's it.
I found this repository I think it can be useful for someone. I used it and it works well.
@davisking
I have CMake(3.12.2) and Microsoft Visual C++ installed on my Windows 10 machine.
After running
python -m pip install dlib
I am getting this error trace:
running install
running build
running build_py
package init file 'dlib\__init__.py' not found (or not a regular file)
running build_ext
Building extension for Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\bong\AppData\Local\Temp\pip-install-ld0kss0g\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\bong\AppData\Local\Temp\pip-install-ld0kss0g\dlib\build\lib.win-amd64-3.7 -DPYTHON_EXECUTABLE=C:\Python37\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\bong\AppData\Local\Temp\pip-install-ld0kss0g\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!
See also "C:/Users/bong/AppData/Local/Temp/pip-install-ld0kss0g/dlib/build/temp.win-amd64-3.7/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\bong\AppData\Local\Temp\pip-install-ld0kss0g\dlib\setup.py", line 257, in <module>
'Topic :: Software Development',
File "C:\Python37\lib\site-packages\setuptools\__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "C:\Python37\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python37\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Python37\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Python37\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "C:\Python37\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Python37\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Python37\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\bong\AppData\Local\Temp\pip-install-ld0kss0g\dlib\setup.py", line 133, in run
self.build_extension(ext)
File "C:\Users\bong\AppData\Local\Temp\pip-install-ld0kss0g\dlib\setup.py", line 170, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:\Python37\lib\subprocess.py", line 328, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\bong\\AppData\\Local\\Temp\\pip-install-ld0kss0g\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\bong\\AppData\\Local\\Temp\\pip-install-ld0kss0g\\dlib\\build\\lib.win-amd64-3.7', '-DPYTHON_EXECUTABLE=C:\\Python37\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\bong\\AppData\\Local\\Temp\\pip-install-ld0kss0g\\dlib\\build\\lib.win-amd64-3.7', '-A', 'x64']' returned non-zero exit status 1.
----------------------------------------
Command "C:\Python37\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\bong\\AppData\\Local\\Temp\\pip-install-ld0kss0g\\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\bong\AppData\Local\Temp\pip-record-vq973c50\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\bong\AppData\Local\Temp\pip-install-ld0kss0g\dlib\
What gives?
PS: I have mingw installed and PATH variable set correctly such that I can call g++ etc through the Windows PowerShell
That error is indicating that you don't have visual studio installed.
@davisking
It seems like that is not the case since I have Visual Studio 2017 installed on the machine described above.
Well, cmake isn't finding it. There are a lot of options when you install
visual studio. Maybe you only installed the C# development tools. You need
to install the Visual C++ tools.
For future reference for people having my problem, reinstalling (modifying) Visual Studio 2017 to include "Desktop development with C++" in it's installation has solved the problem described above.
Thank you @davisking
Try "conda install -c menpo dlib"
Thanks a lot, it worked for me too.
How do i install dlib and opencv in python anaconda?
How do i install dlib and opencv in python anaconda?
have you tried this?
conda install -c conda-forge dlib=19.4
Of course I did. But cant.. I think the version of anaconda and python are different in my pc..
The best Python for run dlib is Python 3.6.8. So:
1- Install Python 3.6.8 from here for 64bit and here for 32bit.
2- Go to cmd command prompt and upgrade pip command with _pip install --upgrade pip_ command.
2- Install cmake library (command: _pip install cmake_).
3- Install dlib library:
for 64 bit with following steps:
A) copy this link
B) Install dlib with _pip install
for 32 bit only with _pip install dlib_ command.
Good luck
(base) C:\Users\shashank>pip install dlib
Collecting dlib
Using cached dlib-19.19.0.tar.gz (3.2 MB)
Building wheels for collected packages: dlib
Building wheel for dlib (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:users\shashank\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\shashank\AppData\Local\Temp\pip-install-fu8ll_7f\dlib\setup.py'"'"'; __file__='"'"'C:\Users\shashank\AppData\Local\Temp\pip-install-fu8ll_7f\dlib\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\shashankAppData\Local\Temppip-wheel-nefkgp8f'
cwd: C:\Users\shashankAppData\Local\Temppip-install-fu8ll_7f\dlib\
Complete output (53 lines):
running bdist_wheel
running build
running build_py
package init file 'dlib__init__.py' not found (or not a regular file)
running build_ext
Traceback (most recent call last):
File "C:\Users\shashankAppData\Local\Temppip-install-fu8ll_7f\dlib\setup.py", line 120, in get_cmake_version
out = subprocess.check_output(['cmake', '--version'])
File "c:users\shashank\anaconda3\lib\subprocess.py", line 395, in check_output
*kwargs).stdout
File "c:users\shashank\anaconda3\lib\subprocess.py", line 472, in run
with Popen(popenargs, **kwargs) as process:
File "c:users\shashank\anaconda3\lib\subprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "c:users\shashank\anaconda3\lib\subprocess.py", line 1178, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "
File "C:\Users\shashankAppData\Local\Temppip-install-fu8ll_7f\dlib\setup.py", line 261, in
'Topic :: Software Development',
File "c:users\shashank\anaconda3\lib\site-packages\setuptools__init__.py", line 145, in setup
return distutils.core.setup(attrs)
File "c:users\shashank\anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:users\shashank\anaconda3\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:users\shashank\anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:users\shashank\anaconda3\lib\site-packages\wheel\bdist_wheel.py", line 192, in run
self.run_command('build')
File "c:users\shashank\anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:users\shashank\anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:users\shashank\anaconda3\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:users\shashank\anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:users\shashank\anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\shashankAppData\Local\Temppip-install-fu8ll_7f\dlib\setup.py", line 129, in run
cmake_version = self.get_cmake_version()
File "C:\Users\shashankAppData\Local\Temppip-install-fu8ll_7f\dlib\setup.py", line 125, in get_cmake_version
"\n***********************\n")
RuntimeError:
CMake must be installed to build the following extensions: dlib
ERROR: Failed building wheel for dlib
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib
Running setup.py install for dlib ... error
ERROR: Command errored out with exit status 1:
command: 'c:users\shashank\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\shashank\AppData\Local\Temp\pip-install-fu8ll_7f\dlib\setup.py'"'"'; __file__='"'"'C:\Users\shashank\AppData\Local\Temp\pip-install-fu8ll_7f\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\shashankAppData\Local\Temppip-record-v2m0ic28install-record.txt' --single-version-externally-managed --compile --install-headers 'c:users\shashank\anaconda3\Include\dlib'
cwd: C:\Users\shashankAppData\Local\Temppip-install-fu8ll_7f\dlib\
Complete output (55 lines):
running install
running build
running build_py
package init file 'dlib__init__.py' not found (or not a regular file)
running build_ext
Traceback (most recent call last):
File "C:\Users\shashankAppData\Local\Temppip-install-fu8ll_7f\dlib\setup.py", line 120, in get_cmake_version
out = subprocess.check_output(['cmake', '--version'])
File "c:users\shashank\anaconda3\lib\subprocess.py", line 395, in check_output
*kwargs).stdout
File "c:users\shashank\anaconda3\lib\subprocess.py", line 472, in run
with Popen(popenargs, **kwargs) as process:
File "c:users\shashank\anaconda3\lib\subprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "c:users\shashank\anaconda3\lib\subprocess.py", line 1178, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\shashank\AppData\Local\Temp\pip-install-fu8ll_7f\dlib\setup.py", line 261, in <module>
'Topic :: Software Development',
File "c:\users\shashank\anaconda3\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "c:\users\shashank\anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\shashank\anaconda3\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\users\shashank\anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\shashank\anaconda3\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\users\shashank\anaconda3\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "c:\users\shashank\anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\shashank\anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\shashank\anaconda3\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\shashank\anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\shashank\anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\shashank\AppData\Local\Temp\pip-install-fu8ll_7f\dlib\setup.py", line 129, in run
cmake_version = self.get_cmake_version()
File "C:\Users\shashank\AppData\Local\Temp\pip-install-fu8ll_7f\dlib\setup.py", line 125, in get_cmake_version
"\n*******************************************************************\n")
RuntimeError:
*******************************************************************
CMake must be installed to build the following extensions: dlib
*******************************************************************
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:users\shashank\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\shashank\AppData\Local\Temp\pip-install-fu8ll_7f\dlib\setup.py'"'"'; __file__='"'"'C:\Users\shashank\AppData\Local\Temp\pip-install-fu8ll_7f\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\shashankAppData\Local\Temppip-record-v2m0ic28install-record.txt' --single-version-externally-managed --compile --install-headers 'c:users\shashank\anaconda3\Include\dlib' Check the logs for full command output.
switch to python 3.5.0
I successfully installed dlib 19.8.1 on Python 3.7 for windows 64bit using
https://www.file-upload.com/qsd69ajuqr2i
hi,
I have windows 10 64 bit and i try and try to install dlib for python with this command:
python setup.py install
but i get error below:
running install
running bdist_egg
running build
Detected Python architecture: 32bit
Detected platform: win32
Removing build directory C:\UsersAvatar\Desktop\dlib-master./tools/python/build
Configuring cmake ...
-- Building for: Visual Studio 12 2013
-- The C compiler identification is MSVC 18.0.21005.1
-- The CXX compiler identification is MSVC 18.0.21005.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find Boost
-- Found PythonLibs: C:/Python27/libs/python27.lib (found suitable version "2.7.9+", minimum required is "2.6")
error: cmake configuration failed!i install cmake GUI and dont know haow can i set it.
and i build from source with cmake command like in readme file:
mkdir build; cd build; cmake .. ; cmake --build .at the end i say that, i want use dlib on python .
does anyone can help me???Thanks a lot....
may be your error can be resolved by installing cmake
pip install cmake
Most helpful comment
Try "conda install -c menpo dlib"