ageitgey / ageitgey/face_recognition

Trying to Install face_recognition on my Windows 10 machine

Open
#339 34 comments 0 reactions 0 assignees View on GitHub

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: Current
  • Python version: 3.6.4
    *Operating System: Windows 10
Description

I am trying to Install face_recognition on my Windows 10 machine

What I Did

`c:\Code>pip install face_recognition
Collecting face_recognition
Using cached face_recognition-1.2.1-py2.py3-none-any.whl
Requirement already satisfied: face-recognition-models>=0.3.0 in c:\program files (x86)\python36-32\lib\site-packages (from face_recognition)
Requirement already satisfied: numpy in c:\program files (x86)\python36-32\lib\site-packages (from face_recognition)
Requirement already satisfied: scipy>=0.17.0 in c:\program files (x86)\python36-32\lib\site-packages (from face_recognition)
Requirement already satisfied: Pillow in c:\program files (x86)\python36-32\lib\site-packages (from face_recognition)
Requirement already satisfied: Click>=6.0 in c:\program files (x86)\python36-32\lib\site-packages (from face_recognition)
Collecting dlib>=19.7 (from face_recognition)
Using cached dlib-19.9.0.tar.gz
Building wheels for collected packages: dlib
Running setup.py bdist_wheel for dlib ... error
Complete output from command "c:\program files (x86)\python36-32\python.exe" -u -c "import setuptools, tokenize;file='C:\Users\alext\AppData\Local\Temp\pip-build-j8x4c1wz\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\alext\AppData\Local\Temp\tmp6juk_8zxpip-wheel- --python-tag cp36:
running bdist_wheel
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\alext\AppData\Local\Temp\pip-build-j8x4c1wz\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\alext\AppData\Local\Temp\pip-build-j8x4c1wz\dlib\build\lib.win32-3.6 -DPYTHON_EXECUTABLE=c:\program files (x86)\python36-32\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\alext\AppData\Local\Temp\pip-build-j8x4c1wz\dlib\build\lib.win32-3.6'
-- 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 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/alext/AppData/Local/Temp/pip-build-j8x4c1wz/dlib/build/temp.win32-3.6/Release/CMakeFiles/CMakeOutput.log".
See also "C:/Users/alext/AppData/Local/Temp/pip-build-j8x4c1wz/dlib/build/temp.win32-3.6/Release/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\alext\AppData\Local\Temp\pip-build-j8x4c1wz\dlib\setup.py", line 238, in
'Topic :: Software Development',
File "c:\program files (x86)\python36-32\lib\site-packages\setuptools_init_.py", line 129, in setup
return distutils.core.setup(**attrs)
File "c:\program files (x86)\python36-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\program files (x86)\python36-32\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\program files (x86)\python36-32\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\program files (x86)\python36-32\lib\site-packages\wheel\bdist_wheel.py", line 204, in run
self.run_command('build')
File "c:\program files (x86)\python36-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\program files (x86)\python36-32\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\program files (x86)\python36-32\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\program files (x86)\python36-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\program files (x86)\python36-32\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\alext\AppData\Local\Temp\pip-build-j8x4c1wz\dlib\setup.py", line 119, in run
self.build_extension(ext)
File "C:\Users\alext\AppData\Local\Temp\pip-build-j8x4c1wz\dlib\setup.py", line 153, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "c:\program files (x86)\python36-32\lib\subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\Users\alext\AppData\Local\Temp\pip-build-j8x4c1wz\dlib\tools\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\alext\AppData\Local\Temp\pip-build-j8x4c1wz\dlib\build\lib.win32-3.6', '-DPYTHON_EXECUTABLE=c:\program files (x86)\python36-32\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\alext\AppData\Local\Temp\pip-build-j8x4c1wz\dlib\build\lib.win32-3.6']' returned non-zero exit status 1.


Failed building wheel for dlib
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib, face-recognition
Running setup.py install for dlib ... error
Complete output from command "c:\program files (x86)\python36-32\python.exe" -u -c "import setuptools, tokenize;file='C:\Users\alext\AppData\Local\Temp\pip-build-j8x4c1wz\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\alext\AppData\Local\Temp\pip-3_4olft1-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\alext\AppData\Local\Temp\pip-build-j8x4c1wz\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\alext\AppData\Local\Temp\pip-build-j8x4c1wz\dlib\build\lib.win32-3.6 -DPYTHON_EXECUTABLE=c:\program files (x86)\python36-32\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\alext\AppData\Local\Temp\pip-build-j8x4c1wz\dlib\build\lib.win32-3.6'
-- 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 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/alext/AppData/Local/Temp/pip-build-j8x4c1wz/dlib/build/temp.win32-3.6/Release/CMakeFiles/CMakeOutput.log".
See also "C:/Users/alext/AppData/Local/Temp/pip-build-j8x4c1wz/dlib/build/temp.win32-3.6/Release/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\alext\AppData\Local\Temp\pip-build-j8x4c1wz\dlib\setup.py", line 238, in <module>
    'Topic :: Software Development',
  File "c:\program files (x86)\python36-32\lib\site-packages\setuptools\__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "c:\program files (x86)\python36-32\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "c:\program files (x86)\python36-32\lib\distutils\dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "c:\program files (x86)\python36-32\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "c:\program files (x86)\python36-32\lib\site-packages\setuptools\command\install.py", line 61, in run
    return orig.install.run(self)
  File "c:\program files (x86)\python36-32\lib\distutils\command\install.py", line 545, in run
    self.run_command('build')
  File "c:\program files (x86)\python36-32\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "c:\program files (x86)\python36-32\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "c:\program files (x86)\python36-32\lib\distutils\command\build.py", line 135, in run
    self.run_command(cmd_name)
  File "c:\program files (x86)\python36-32\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "c:\program files (x86)\python36-32\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "C:\Users\alext\AppData\Local\Temp\pip-build-j8x4c1wz\dlib\setup.py", line 119, in run
    self.build_extension(ext)
  File "C:\Users\alext\AppData\Local\Temp\pip-build-j8x4c1wz\dlib\setup.py", line 153, in build_extension
    subprocess.check_call(cmake_setup, cwd=build_folder)
  File "c:\program files (x86)\python36-32\lib\subprocess.py", line 291, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\alext\\AppData\\Local\\Temp\\pip-build-j8x4c1wz\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\alext\\AppData\\Local\\Temp\\pip-build-j8x4c1wz\\dlib\\build\\lib.win32-3.6', '-DPYTHON_EXECUTABLE=c:\\program files (x86)\\python36-32\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\alext\\AppData\\Local\\Temp\\pip-build-j8x4c1wz\\dlib\\build\\lib.win32-3.6']' returned non-zero exit status 1.

----------------------------------------

Command ""c:\program files (x86)\python36-32\python.exe" -u -c "import setuptools, tokenize;file='C:\Users\alext\AppData\Local\Temp\pip-build-j8x4c1wz\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\alext\AppData\Local\Temp\pip-3_4olft1-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\alext\AppData\Local\Temp\pip-build-j8x4c1wz\dlib`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported pip install face_recognition command and the dlib setup.py build output. Review the CMake configuration and the missing cl compiler error in the Windows 10, 32-bit Python 3.6 environment. Done means the package installs successfully in the reported setup or the project clearly documents the supported installation path.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.