Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.
IMPORTANT: If your issue is related to a specific picture, include it so others can reproduce the issue.
C:Usersnaray>pip3 install face_recognition
Collecting face_recognition
Using cached https://files.pythonhosted.org/packages/3f/ed/ad9a28042f373d4633fc8b49109b623597d6f193d3bbbef7780a5ee8eef2/face_recognition-1.2.3-py2.py3-none-any.whl
Requirement already satisfied: Click>=6.0 in c:usersnarayappdatalocalprogramspythonpython37-32libsite-packages (from face_recognition) (7.0)
Requirement already satisfied: Pillow in c:usersnarayappdatalocalprogramspythonpython37-32libsite-packages (from face_recognition) (5.4.1)
Requirement already satisfied: face-recognition-models>=0.3.0 in c:usersnarayappdatalocalprogramspythonpython37-32libsite-packages (from face_recognition) (0.3.0)
Requirement already satisfied: numpy in c:usersnarayappdatalocalprogramspythonpython37-32libsite-packages (from face_recognition) (1.16.2)
Collecting dlib>=19.7 (from face_recognition)
Using cached https://files.pythonhosted.org/packages/35/8d/e4ddf60452e2fb1ce3164f774e68968b3f110f1cb4cd353235d56875799e/dlib-19.16.0.tar.gz
Installing collected packages: dlib, face-recognition
Running setup.py install for dlib ... error
Complete output from command c:usersnarayappdatalocalprogramspythonpython37-32python.exe -u -c "import setuptools, tokenize;__file__='C:\Users\naray\AppData\Local\Temp\pip-install-qey1pyw5\dlib\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:UsersnarayAppDataLocalTemppip-record-33mr_s50install-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
Building extension for Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 22:20:52) [MSC v.1916 32 bit (Intel)]
Invoking CMake setup: 'cmake C:UsersnarayAppDataLocalTemppip-install-qey1pyw5dlibtoolspython -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:UsersnarayAppDataLocalTemppip-install-qey1pyw5dlibbuildlib.win32-3.7 -DPYTHON_EXECUTABLE=c:usersnarayappdatalocalprogramspythonpython37-32python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:UsersnarayAppDataLocalTemppip-install-qey1pyw5dlibbuildlib.win32-3.7'
-- 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/naray/AppData/Local/Temp/pip-install-qey1pyw5/dlib/build/temp.win32-3.7/Release/CMakeFiles/CMakeOutput.log".
See also "C:/Users/naray/AppData/Local/Temp/pip-install-qey1pyw5/dlib/build/temp.win32-3.7/Release/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\naray\AppData\Local\Temp\pip-install-qey1pyw5\dlib\setup.py", line 257, in <module>
'Topic :: Software Development',
File "c:\users\naray\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\__init__.py", line 143, in setup
return distutils.core.setup(**attrs)
File "c:\users\naray\appdata\local\programs\python\python37-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\naray\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\users\naray\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\naray\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\naray\appdata\local\programs\python\python37-32\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "c:\users\naray\appdata\local\programs\python\python37-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\naray\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\naray\appdata\local\programs\python\python37-32\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\naray\appdata\local\programs\python\python37-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\naray\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\naray\AppData\Local\Temp\pip-install-qey1pyw5\dlib\setup.py", line 133, in run
self.build_extension(ext)
File "C:\Users\naray\AppData\Local\Temp\pip-install-qey1pyw5\dlib\setup.py", line 170, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "c:\users\naray\appdata\local\programs\python\python37-32\lib\subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\naray\\AppData\\Local\\Temp\\pip-install-qey1pyw5\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\naray\\AppData\\Local\\Temp\\pip-install-qey1pyw5\\dlib\\build\\lib.win32-3.7', '-DPYTHON_EXECUTABLE=c:\\users\\naray\\appdata\\local\\programs\\python\\python37-32\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\naray\\AppData\\Local\\Temp\\pip-install-qey1pyw5\\dlib\\build\\lib.win32-3.7']' returned non-zero exit status
Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
@gd1m3y
Is CMAKE installed in your system?
@gd1m3y
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.
For more info I recommend checking out #81
First install Dlib seperate after you can install face_recognition
For more details,
https://github.com/ManivannanMurugavel/pyfacy
Solved the issue by install cmake via pip
pip3 install cmake
If any windows user is looking for precompiled dlib (whl file) then go this link follow instruction and download
https://github.com/charlielito/install-dlib-python-windows
Try to install through anaconda prompt
pip install cmake
pip --no-cache-dir install face_recognition
It works.
try install cmake
and install face_recognition_dlib file manually
Or go here all dlib error solved
https://youtu.be/jjRFCTmK2SY
Try this for anaconda
conda install -c conda-forge face_recognition
Most helpful comment
@gd1m3y
If you have conda installed in your system follow this process.
Here I install face_recognition once to make sure all the dependencies is included.
pip install face_recognitionNote that here the installation will fail because pip fail to detect the dlib conda installed earlier
Therefor I run
pip install --no-dependencies face_recognitionThis should complete installation. I was able to run dlib fine.
For more info I recommend checking out #81