ageitgey / ageitgey/face_recognition
Problem with installation
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 56.8k
- Forks
- 13.7k
- PR merge metrics
- No merged PRs in 30d
Description
- face_recognition version:
- Python version: 3.6.4
- Operating System: Windows 7 32Bit
Hello everyone, especially Adam,
I have problem when installing Face Recognition library. I already try it for around 1 weeks and I still can't get the solution. Please help me to find the solution. This is what the error like:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Lenovo>py -m pip install face_recognition --no-cache-dir
Requirement already satisfied: face_recognition in c:\users\lenovo\appdata\local
\programs\python\python36-32\lib\site-packages\face_recognition-1.2.2-py3.6.egg
Requirement already satisfied: face_recognition_models>=0.3.0 in c:\users\lenovo
\appdata\local\programs\python\python36-32\lib\site-packages (from face_recognit
ion)
Requirement already satisfied: Click>=6.0 in c:\users\lenovo\appdata\local\progr
ams\python\python36-32\lib\site-packages (from face_recognition)
Collecting dlib>=19.7 (from face_recognition)
Downloading dlib-19.9.0.tar.gz (3.1MB)
100% |████████████████████████████████| 3.1MB 729kB/s
Collecting numpy (from face_recognition)
Downloading numpy-1.14.2-cp36-none-win32.whl (9.8MB)
100% |████████████████████████████████| 9.8MB 937kB/s
Requirement already satisfied: Pillow in c:\users\lenovo\appdata\local\programs\
python\python36-32\lib\site-packages\pillow-5.0.0-py3.6-win32.egg (from face_rec
ognition)
Installing collected packages: dlib, numpy
Running setup.py install for dlib ... error
Complete output from command C:\Users\Lenovo\AppData\Local\Programs\Python\P
ython36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Le
novo\\AppData\\Local\\Temp\\pip-build-_mqhry2f\\dlib\\setup.py';f=getattr(tokeni
ze, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(c
ompile(code, __file__, 'exec'))" install --record C:\Users\Lenovo\AppData\Local\
Temp\pip-2lgef9te-record\install-record.txt --single-version-externally-managed
--compile:
running install
running build
running build_py
package init file 'dlib\__init__.py' not found (or not a regular file)
running build_ext
Invoking CMake setup: 'cmake C:\Users\Lenovo\AppData\Local\Temp\pip-build-_m
qhry2f\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Lenovo\AppDat
a\Local\Temp\pip-build-_mqhry2f\dlib\build\lib.win32-3.6 -DPYTHON_EXECUTABLE=C:\
Users\Lenovo\AppData\Local\Programs\Python\Python36-32\python.exe -DCMAKE_LIBRAR
Y_OUTPUT_DIRECTORY_RELEASE=C:\Users\Lenovo\AppData\Local\Temp\pip-build-_mqhry2f
\dlib\build\lib.win32-3.6'
-- Building for: Visual Studio 14 2015
CMake Error in CMakeLists.txt:
Failed to run MSBuild command:
C:/Program Files/MSBuild/14.0/bin/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 17/03/2018 17:38:55.
Project "C:\Users\Lenovo\AppData\Local\Temp\pip-build-_mqhry2f\dlib\buil
d\temp.win32-3.6\Release\CMakeFiles\3.10.0\VCTargetsPath.vcxproj" on node 1 (def
ault targets).
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Win32\Platfor
mToolsets\v140\Toolset.targets(34,5): error MSB8036: The Windows SDK version 8.1
was not found. Install the required version of Windows SDK or change the SDK ve
rsion in the project property pages or by right-clicking the solution and select
ing "Retarget solution". [C:\Users\Lenovo\AppData\Local\Temp\pip-build-_mqhry2f\
dlib\build\temp.win32-3.6\Release\CMakeFiles\3.10.0\VCTargetsPath.vcxproj]
Done Building Project "C:\Users\Lenovo\AppData\Local\Temp\pip-build-_mqh
ry2f\dlib\build\temp.win32-3.6\Release\CMakeFiles\3.10.0\VCTargetsPath.vcxproj"
(default targets) -- FAILED.
Build FAILED.
"C:\Users\Lenovo\AppData\Local\Temp\pip-build-_mqhry2f\dlib\build\temp.w
in32-3.6\Release\CMakeFiles\3.10.0\VCTargetsPath.vcxproj" (default target) (1) -
>
(Desktop_PlatformPrepareForBuild target) ->
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Win32\Platf
ormToolsets\v140\Toolset.targets(34,5): error MSB8036: The Windows SDK version 8
.1 was not found. Install the required version of Windows SDK or change the SDK
version in the project property pages or by right-clicking the solution and sele
cting "Retarget solution". [C:\Users\Lenovo\AppData\Local\Temp\pip-build-_mqhry2
f\dlib\build\temp.win32-3.6\Release\CMakeFiles\3.10.0\VCTargetsPath.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:05.03
Exit code: 1
-- Configuring incomplete, errors occurred!
See also "C:/Users/Lenovo/AppData/Local/Temp/pip-build-_mqhry2f/dlib/build/t
emp.win32-3.6/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Lenovo\AppData\Local\Temp\pip-build-_mqhry2f\dlib\setup.py"
, line 238, in <module>
'Topic :: Software Development',
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python36-32\lib\distut
ils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python36-32\lib\distut
ils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python36-32\lib\distut
ils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python36-32\lib\site-p
ackages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python36-32\lib\distut
ils\command\install.py", line 545, in run
self.run_command('build')
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python36-32\lib\distut
ils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python36-32\lib\distut
ils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python36-32\lib\distut
ils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python36-32\lib\distut
ils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python36-32\lib\distut
ils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Lenovo\AppData\Local\Temp\pip-build-_mqhry2f\dlib\setup.py"
, line 119, in run
self.build_extension(ext)
File "C:\Users\Lenovo\AppData\Local\Temp\pip-build-_mqhry2f\dlib\setup.py"
, line 153, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python36-32\lib\subpro
cess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\Lenovo\\AppDat
a\\Local\\Temp\\pip-build-_mqhry2f\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPU
T_DIRECTORY=C:\\Users\\Lenovo\\AppData\\Local\\Temp\\pip-build-_mqhry2f\\dlib\\b
uild\\lib.win32-3.6', '-DPYTHON_EXECUTABLE=C:\\Users\\Lenovo\\AppData\\Local\\Pr
ograms\\Python\\Python36-32\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELE
ASE=C:\\Users\\Lenovo\\AppData\\Local\\Temp\\pip-build-_mqhry2f\\dlib\\build\\li
b.win32-3.6']' returned non-zero exit status 1.
----------------------------------------
Command "C:\Users\Lenovo\AppData\Local\Programs\Python\Python36-32\python.exe -u
-c "import setuptools, tokenize;__file__='C:\\Users\\Lenovo\\AppData\\Local\\Te
mp\\pip-build-_mqhry2f\\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\Lenovo\AppData\Local\Temp\pip-2lgef9te-record
\install-record.txt --single-version-externally-managed --compile" failed with e
rror code 1 in C:\Users\Lenovo\AppData\Local\Temp\pip-build-_mqhry2f\dlib\�
Please help for the solution,
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported pip install face_recognition output and dlib's setup.py build entry point; the failure occurs when CMake invokes MSBuild because the Windows SDK 8.1 is missing. Confirm an installation path for the reported Windows 7 and Python 3.6 32-bit setup, with success defined as completing the face_recognition installation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, python
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100