face_recognition icon indicating copy to clipboard operation
face_recognition copied to clipboard

Trying to Install face_recognition on my Windows 10 machine

Open drawalex opened this issue 7 years ago • 34 comments

  • 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`

drawalex avatar Feb 02 '18 19:02 drawalex

I faced the same issue and then after googling and digging deep on stackoverflow I tried following to install face_recognition.

1.First install Visual studio to remove this error

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).

2.Then use this command to install

pip --no-cache-dir install face_recognition

Hope it wud help

Priya-sopho avatar Feb 03 '18 18:02 Priya-sopho

-- The C compiler identification is unknown -- The CXX compiler identification is unknown

Either you don't have a compiler installed or it is not on your path.

If you don't have one you can use - Build Tools for Visual Studio 2017 https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=15

If you do already have one installed then add it your path so you can call cl from the command line.

facepainter avatar Feb 10 '18 09:02 facepainter

The above mentioned ways work. So let's close the issue.

Feel free to open it again, if you face issues.

AlabhyaVaibhav avatar May 25 '18 07:05 AlabhyaVaibhav

It's not working for me, i installed visual studio and used this (pip --no-cache-dir install face_recognition) command. But it still showing same error.

arunrathore45 avatar Jun 20 '18 12:06 arunrathore45

hello,have you solved the problem?@arunrathore45

tensorflowt avatar Jun 24 '18 01:06 tensorflowt

just manually install the library

nuketownhf avatar Jul 05 '18 13:07 nuketownhf

not working for me either. installed visual studio

AnasKamali avatar Sep 17 '18 08:09 AnasKamali

I did the below steps. i have windows 10 with python 3.4. If you have not tried anything please use the below step and it work for you.

  1. pip install cmake
  2. download visual studio build tool
  3. pip --no-cache-dir install face_recognition

it worked for me. Initially i tried installing dlib directly and it did not worked.

alok001 avatar Dec 08 '18 17:12 alok001

@alok001 Where should I be running 'pip --no-cache-dir install face_recognition'? I have a anaconda environment and I'd like to install 'face_recognition'

ruculent avatar Dec 12 '18 07:12 ruculent

@facepainter How do I add VS to PATH?

ruculent avatar Dec 12 '18 07:12 ruculent

I am using Windows 10,python 3.5 and pycharm editor. I installed dlib from Anaconda cloud successfully. But when i try to work sample code for face recognition via webcam, i am getting error "No module named face_recognition" . When i try to import dlib, there is no problem. Is there anyone help me?

mhmtozkan avatar Jan 06 '19 19:01 mhmtozkan

If you want to install dlib and face_recognition module 100%, then must follow the following instruction:

Step1: Go to your conda invironment Step2: At first install pip by " conda install pip " command Step3: Then install cmake by " pip install cmake" command Step4: Then download "dlib-19.16.zip" file from " http://dlib.net " website and paste it " C:\Users\bakulru800 " Location. Here bakulru800 is my pc name. It will be your own pc name. Step5: Then install dlib by " pip install dlib-19.16.zip " command Step6: And finally install " face_recognition " by " pip install face_recognition " command

bakulru800 avatar Jan 30 '19 06:01 bakulru800

Thanks Bakulru. I will try it and give you feedback.

Edited : I did it step by step but at step5 i got cmake error.

And also at step1 how can i go to conda environment? I couldnt get this point clearly.

mhmtozkan avatar Jan 30 '19 12:01 mhmtozkan

Hi guys, regarding dlib and cmake installing follow these steps in links: https://www.learnopencv.com/install-dlib-on-windows/ https://www.learnopencv.com/install-opencv3-on-windows/

DanSa83 avatar Feb 01 '19 09:02 DanSa83

TRY THIS https://stackoverflow.com/questions/54967887/solution-install-dlibpython-and-get-error

lupangsogood avatar Mar 03 '19 10:03 lupangsogood

this should help https://stackoverflow.com/a/52803626/2696230

a-kanaan avatar Apr 09 '19 05:04 a-kanaan

If you want to install dlib and face_recognition module 100%, then must follow the following instruction:

Step1: Go to your conda invironment Step2: At first install pip by " conda install pip " command Step3: Then install cmake by " pip install cmake" command Step4: Then download "dlib-19.16.zip" file from " http://dlib.net " website and paste it " C:\Users\bakulru800 " Location. Here bakulru800 is my pc name. It will be your own pc name. Step5: Then install dlib by " pip install dlib-19.16.zip " command Step6: And finally install " face_recognition " by " pip install face_recognition " command

i don't know why but this one is working for me.

Thanks

ghost avatar May 30 '19 07:05 ghost

If you want to install dlib and face_recognition module 100%, then must follow the following instruction:

Step1: Go to your conda invironment Step2: At first install pip by " conda install pip " command Step3: Then install cmake by " pip install cmake" command Step4: Then download "dlib-19.16.zip" file from " http://dlib.net " website and paste it " C:\Users\bakulru800 " Location. Here bakulru800 is my pc name. It will be your own pc name. Step5: Then install dlib by " pip install dlib-19.16.zip " command Step6: And finally install " face_recognition " by " pip install face_recognition " command

Finally, my problem was solved thanks to your guidance

alzabt01 avatar Jul 17 '19 11:07 alzabt01

still it is not working for me. :( ` No CMAKE_C_COMPILER could be found.

CMake Error at CMakeLists.txt:3 (project):
  No CMAKE_CXX_COMPILER could be found.

`

Please help!

sultanmansoor40 avatar Nov 16 '19 10:11 sultanmansoor40

I was also stuck at this problem and for me the following solution worked:

  1. Install Cmake from the following link.

  2. Install the C++ latest build tools from the visual studio website build tools

  3. Add cmake bin folder and build tools to the path, the default paths of the both are following: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools C:\Program Files\CMake\bin if you have installed it in a different location add those paths

4 . Now run the command in cmd pip install face_recognition

This should work in most cases

imqureshi avatar Dec 06 '19 07:12 imqureshi

Tried out Every Possible Solution Written Above Still get the same error.

`Installing collected packages: dlib, face-recognition Running setup.py install for dlib ... error ERROR: Command errored out with exit status 1: command: 'c:\users\himan\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\himan\AppData\Local\Temp\pip-install-6p1fap9g\dlib\setup.py'"'"'; file='"'"'C:\Users\himan\AppData\Local\Temp\pip-install-6p1fap9g\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\himan\AppData\Local\Temp\pip-record-96h4_z4o\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\himan\appdata\local\programs\python\python37-32\Include\dlib' cwd: C:\Users\himan\AppData\Local\Temp\pip-install-6p1fap9g\dlib
Complete output (80 lines): 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.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 19:29:22) [MSC v.1916 32 bit (Intel)] Invoking CMake setup: 'cmake C:\Users\himan\AppData\Local\Temp\pip-install-6p1fap9g\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\himan\AppData\Local\Temp\pip-install-6p1fap9g\dlib\build\lib.win32-3.7 -DPYTHON_EXECUTABLE=c:\users\himan\appdata\local\programs\python\python37-32\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\himan\AppData\Local\Temp\pip-install-6p1fap9g\dlib\build\lib.win32-3.7' -- Building for: NMake Makefiles -- The C compiler identification is unknown -- The CXX compiler identification is unknown CMake Error at CMakeLists.txt:3 (project): 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 at CMakeLists.txt:3 (project):
  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/himan/AppData/Local/Temp/pip-install-6p1fap9g/dlib/build/temp.win32-3.7/Release/CMakeFiles/CMakeOutput.log".
See also "C:/Users/himan/AppData/Local/Temp/pip-install-6p1fap9g/dlib/build/temp.win32-3.7/Release/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\himan\AppData\Local\Temp\pip-install-6p1fap9g\dlib\setup.py", line 261, in <module>
    'Topic :: Software Development',
  File "c:\users\himan\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "c:\users\himan\appdata\local\programs\python\python37-32\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "c:\users\himan\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "c:\users\himan\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "c:\users\himan\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\command\install.py", line 61, in run
    return orig.install.run(self)
  File "c:\users\himan\appdata\local\programs\python\python37-32\lib\distutils\command\install.py", line 545, in run
    self.run_command('build')
  File "c:\users\himan\appdata\local\programs\python\python37-32\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "c:\users\himan\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "c:\users\himan\appdata\local\programs\python\python37-32\lib\distutils\command\build.py", line 135, in run
    self.run_command(cmd_name)
  File "c:\users\himan\appdata\local\programs\python\python37-32\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "c:\users\himan\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\himan\AppData\Local\Temp\pip-install-6p1fap9g\dlib\setup.py", line 135, in run
    self.build_extension(ext)
  File "C:\Users\himan\AppData\Local\Temp\pip-install-6p1fap9g\dlib\setup.py", line 172, in build_extension
    subprocess.check_call(cmake_setup, cwd=build_folder)
  File "c:\users\himan\appdata\local\programs\python\python37-32\lib\subprocess.py", line 347, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\himan\\AppData\\Local\\Temp\\pip-install-6p1fap9g\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\himan\\AppData\\Local\\Temp\\pip-install-6p1fap9g\\dlib\\build\\lib.win32-3.7', '-DPYTHON_EXECUTABLE=c:\\users\\himan\\appdata\\local\\programs\\python\\python37-32\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\himan\\AppData\\Local\\Temp\\pip-install-6p1fap9g\\dlib\\build\\lib.win32-3.7']' returned non-zero exit status 1.
----------------------------------------

ERROR: Command errored out with exit status 1: 'c:\users\himan\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\himan\AppData\Local\Temp\pip-install-6p1fap9g\dlib\setup.py'"'"'; file='"'"'C:\Users\himan\AppData\Local\Temp\pip-install-6p1fap9g\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\himan\AppData\Local\Temp\pip-record-96h4_z4o\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\himan\appdata\local\programs\python\python37-32\Include\dlib' Check the logs for full command output.`

himanshugullaiya avatar Feb 12 '20 12:02 himanshugullaiya

I think Windows not officially supported, this shit is only working on Linux and MacOs...but it might be work... see this shit ---> https://github.com/ageitgey/face_recognition/issues/175

x64nik avatar Feb 28 '20 14:02 x64nik

While trying to install pip install face_recognition in windows i got the below error. ERROR: Could not find a version that satisfies the requirement face_recognition (from versions: none) ERROR: No matching distribution found for face_recognition

Then i learnt that i need to install CMake , trying to install the same but got the below error

ERROR: Could not find a version that satisfies the requirement CMake (from versions: none) ERROR: No matching distribution found for CMake

Can you some one please help me on this

km-dri avatar Apr 02 '20 21:04 km-dri

you need to switch to python 3.5.0

with privileged command prompt you may install dlib, face_recognition using pip tool without any problem

DAkbari avatar Apr 03 '20 06:04 DAkbari

@DAkbari Thank you. Do you mean python 3.7.3 not works ? please advise.

km-dri avatar Apr 03 '20 06:04 km-dri

@km-dri i tried different suggestions but non worked for me everything is fine with 3.5.0 + on linux but on windows i haven had any chance

DAkbari avatar Apr 03 '20 07:04 DAkbari

If you have conda installed in your system follow this process.

conda create -n py36 python=3.6 activate py36 conda config --add channels conda-forge conda install numpy conda install scipy conda install dlib Here I install face_recognition once to make sure all the dependencies is included.

pip install face_recognition

Note that here the installation will fail because pip fail to detect the dlib conda installed earlier Therefor I run

pip install --no-dependencies face_recognition

This should complete installation. I was able to run dlib fine.

Pawanm001 avatar May 07 '20 15:05 Pawanm001

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

HatFayed avatar May 21 '20 09:05 HatFayed

The problem is with dlib. https://stackoverflow.com/questions/41912372/dlib-installation-on-windows-10.

Keramatfar avatar Sep 20 '20 18:09 Keramatfar

If you are using a Mac os, Follow the process:

- pip install cmake

- pip --no-cache-dir install face_recognition

Soro08 avatar Oct 06 '20 19:10 Soro08