Errors installing the module face_recognition in Python - python

I am having a huge error on installing face_recognition. I tried python -m pip install face_recognition in the terminal and I also tried pip3 install face_recognition as well as pip install face_recognition. I have no idea what to do and I am getting an error while building wheel for dlib (setup.py). This is the full thing:-
ERROR: Command errored out with exit status 1:
command: 'C:\Users\IamOm\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\IamOm\\AppData\\Local\\Temp\\pip-install-ulht78ry\\dlib_7953cb5ea1714420b8441816f930d73b\\setup.py'"'"'; __file__='"'"'C:\\Users\\IamOm\\AppData\\Local\\Temp\\pip-install-ulht78ry\\dlib_7953cb5ea1714420b8441816f930d73b\\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\IamOm\AppData\Local\Temp\pip-wheel-wiu22jp0'
cwd: C:\Users\IamOm\AppData\Local\Temp\pip-install-ulht78ry\dlib_7953cb5ea1714420b8441816f930d73b\
Complete output (53 lines):
running bdist_wheel
running build
running build_py
package init file 'tools\python\dlib\__init__.py' not found (or not a regular file)
running build_ext
Traceback (most recent call last):
File "C:\Users\IamOm\AppData\Local\Temp\pip-install-ulht78ry\dlib_7953cb5ea1714420b8441816f930d73b\setup.py", line 120, in get_cmake_version
out = subprocess.check_output(['cmake', '--version'])
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 489, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
Next, I had another exception:-
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\IamOm\AppData\Local\Temp\pip-install-ulht78ry\dlib_7953cb5ea1714420b8441816f930d73b\setup.py", line 223, in <module>
setup(
File "C:\Users\IamOm\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\setuptools\__init__.py", line 163, in setup
return distutils.core.setup(**attrs)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\IamOm\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\wheel\bdist_wheel.py", line 290, in run
self.run_command('build')
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\IamOm\AppData\Local\Temp\pip-install-ulht78ry\dlib_7953cb5ea1714420b8441816f930d73b\setup.py", line 129, in run
cmake_version = self.get_cmake_version()
File "C:\Users\IamOm\AppData\Local\Temp\pip-install-ulht78ry\dlib_7953cb5ea1714420b8441816f930d73b\setup.py", line 122, in get_cmake_version
raise RuntimeError("\n*******************************************************************\n" +
RuntimeError:
*******************************************************************
CMake must be installed to build the following extensions: _dlib_pybind11
*******************************************************************
I already have CMake installed on my system without any errors, still I get this.
ERROR: Failed building wheel for dlib
Then it ran setup.py clean for dlib:-
Running setup.py clean for dlib
Failed to build dlib
Then it ran setup.py install for dlib:-
Running setup.py install for dlib ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\IamOm\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\IamOm\\AppData\\Local\\Temp\\pip-install-ulht78ry\\dlib_7953cb5ea1714420b8441816f930d73b\\setup.py'"'"'; __file__='"'"'C:\\Users\\IamOm\\AppData\\Local\\Temp\\pip-install-ulht78ry\\dlib_7953cb5ea1714420b8441816f930d73b\\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\IamOm\AppData\Local\Temp\pip-record-3tst66j8\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\IamOm\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Include\dlib'
cwd: C:\Users\IamOm\AppData\Local\Temp\pip-install-ulht78ry\dlib_7953cb5ea1714420b8441816f930d73b\
Complete output (55 lines):
running install
running build
running build_py
package init file 'tools\python\dlib\__init__.py' not found (or not a regular file)
running build_ext
Traceback (most recent call last):
File "C:\Users\IamOm\AppData\Local\Temp\pip-install-ulht78ry\dlib_7953cb5ea1714420b8441816f930d73b\setup.py", line 120, in get_cmake_version
out = subprocess.check_output(['cmake', '--version'])
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 489, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
And then another exception:-
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\IamOm\AppData\Local\Temp\pip-install-ulht78ry\dlib_7953cb5ea1714420b8441816f930d73b\setup.py", line 223, in <module>
setup(
File "C:\Users\IamOm\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\setuptools\__init__.py", line 163, in setup
return distutils.core.setup(**attrs)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\IamOm\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\IamOm\AppData\Local\Temp\pip-install-ulht78ry\dlib_7953cb5ea1714420b8441816f930d73b\setup.py", line 129, in run
cmake_version = self.get_cmake_version()
File "C:\Users\IamOm\AppData\Local\Temp\pip-install-ulht78ry\dlib_7953cb5ea1714420b8441816f930d73b\setup.py", line 122, in get_cmake_version
raise RuntimeError("\n*******************************************************************\n" +
RuntimeError:
*******************************************************************
CMake must be installed to build the following extensions: _dlib_pybind11
*******************************************************************
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\IamOm\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\IamOm\\AppData\\Local\\Temp\\pip-install-ulht78ry\\dlib_7953cb5ea1714420b8441816f930d73b\\setup.py'"'"'; __file__='"'"'C:\\Users\\IamOm\\AppData\\Local\\Temp\\pip-install-ulht78ry\\dlib_7953cb5ea1714420b8441816f930d73b\\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\IamOm\AppData\Local\Temp\pip-record-3tst66j8\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\IamOm\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Include\dlib' Check the logs for full command output.
Please help me guys.

Here are some steps to install face_recognition in windows.
Install Anaconda3 for windows
Create an environment with python3.6
Install Microsoft Visual Studio 2017 or Upgrade
(C++ packages includes c++/CLI must be installed for CMake)
Update Visual Sutudio 2017
Reboot the Computer
Download CMake (https://cmake.org/download/) and Install it
Activate specific of Anaconda3 in the 'cmd'
pip3 install face_recognition
face_recognition and dlib are not fully installed in specific , but default anaconda env.
so you should to copy from
c:\programdata\anaconda3\scripts\face_detection.exe
c:\programdata\anaconda3\scripts\face_recognition.exe
to \scripts\
and
c:\programdata\anaconda3\lib\site-packages\dlib-19.15.0.dist-info\*
c:\programdata\anaconda3\lib\site-packages\dlib.cp36-win_amd64.pyd
to \Lib\site-package\
Finally, run the code below for test
import cv2
import dlib
import face_recognition
detector = dlib.get_frontal_face_detector()
cap = cv2.VideoCapture(0)
while(True):
ret, frame = cap.read()
dets = face_recognition.face_locations(frame, model="cnn")
print("face_recognition:",dets)
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
dets = detector(gray, 1)
for i, d in enumerate(dets):
print("dlib: Left: {} Top: {} Right: {} Bottom: {}".format(
d.left(), d.top(), d.right(), d.bottom()))
if cv2.waitKey(1) & 0xFF == ord('q'):
break
How to use GPU (Cuda) for DLib
Download dlib-XX.XX.zip in the dlib site (http://dlib.net/)
Activate in 'cmd' as administrator
python setup.py install --yes USE_AVX_INSTRUCTIONS --yes DLIB_USE_CUDA
if not working, try below
python setup.py install --yes USE_AVX_INSTRUCTIONS --clean

First, make sure you install cmake. Then, you can download dlib from the Github link. After you do that, you can install face_recognition with pip(3).

Related

python wmm2020 module importing error, what is the issue? [duplicate]

Facing the following error while installing dlib for the OpenCV project. It shows that
CMake must be installed to build the following extensions: dlib.
Command Output:
Collecting dlib==19.18.0
Using cached dlib-19.18.0.tar.gz (3.1 MB)
Using legacy 'setup.py install' for dlib, since package 'wheel' is not installed.
Installing collected packages: dlib
Running setup.py install for dlib: started
Running setup.py install for dlib: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'D:\Install Drive\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\mahmu\\AppData\\Local\\Temp\\pip-install-a4s1a_zh\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\mahmu\\AppData\\Local\\Temp\\pip-install-a4s1a_zh\\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\mahmu\AppData\Local\Temp\pip-record-mjm6k3c3\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\Install Drive\Include\dlib'
cwd: C:\Users\mahmu\AppData\Local\Temp\pip-install-a4s1a_zh\dlib\
Complete output (57 lines):
running install
running build
running build_py
package init file 'dlib\__init__.py' not found (or not a regular file)
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
Traceback (most recent call last):
File "C:\Users\mahmu\AppData\Local\Temp\pip-install-a4s1a_zh\dlib\setup.py", line 120, in get_cmake_version
out = subprocess.check_output(['cmake', '--version'])
File "D:\Install Drive\lib\subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "D:\Install Drive\lib\subprocess.py", line 505, in run
with Popen(*popenargs, **kwargs) as process:
File "D:\Install Drive\lib\subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "D:\Install Drive\lib\subprocess.py", line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
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\mahmu\AppData\Local\Temp\pip-install-a4s1a_zh\dlib\setup.py", line 223, in <module>
setup(
File "D:\Install Drive\lib\site-packages\setuptools\__init__.py", line 165, in setup
return distutils.core.setup(**attrs)
File "D:\Install Drive\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "D:\Install Drive\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "D:\Install Drive\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "D:\Install Drive\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "D:\Install Drive\lib\distutils\command\install.py", line 546, in run
self.run_command('build')
File "D:\Install Drive\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "D:\Install Drive\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "D:\Install Drive\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "D:\Install Drive\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "D:\Install Drive\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\mahmu\AppData\Local\Temp\pip-install-a4s1a_zh\dlib\setup.py", line 129, in run
cmake_version = self.get_cmake_version()
File "C:\Users\mahmu\AppData\Local\Temp\pip-install-a4s1a_zh\dlib\setup.py", line 122, in get_cmake_version
raise RuntimeError("\n*******************************************************************\n" +
RuntimeError:
*******************************************************************
CMake must be installed to build the following extensions: dlib
*******************************************************************
----------------------------------------
ERROR: Command errored out with exit status 1: 'D:\Install Drive\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\mahmu\\AppData\\Local\\Temp\\pip-install-a4s1a_zh\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\mahmu\\AppData\\Local\\Temp\\pip-install-a4s1a_zh\\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\mahmu\AppData\Local\Temp\pip-record-mjm6k3c3\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\Install Drive\Include\dlib' Check the logs for full command output.
WARNING: You are using pip version 20.2.3; however, version 21.1.2 is available.
You should consider upgrading via the 'D:\Install Drive\python.exe -m pip install --upgrade pip' command.
Notice that in the output that "CMake must be installed to build the following extensions: dlib". So install CMake first and only then try to install dlib. If CMake is installed, try updating your pip version to 21.1.2 via "D:\Install Drive\python.exe -m pip install --upgrade pip".
It requires cmake must be installed before installing dlib. Do execute in the following order.
pip install cmake
pip install dlib
This will fix the issue.

pip install error when trying to install face_recognition module [duplicate]

This question already has answers here:
An error occurred while installing face_recognition Error text: Collecting face_recognition
(5 answers)
Closed 2 years ago.
I have a problem when trying to install the face_recognition module using the commandprompt, I used pip install face_recognition, but I get a error and I can't resolve it myself. Anyone who can help?
I installed python through Microsoft studios (Python 3.8).
My pip version is 20.2.1
I also tried pip install face_recognition=1.3.0
My error is right here:
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Bruger\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Bruger\\AppData\\Local\\Temp\\pip-install-hoq7h4eo\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Bruger\\AppData\\Local\\Temp\\pip-install-hoq7h4eo\\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\Bruger\AppData\Local\Temp\pip-record-w68bakhl\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\Bruger\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Include\dlib'
cwd: C:\Users\Bruger\AppData\Local\Temp\pip-install-hoq7h4eo\dlib\
Complete output (55 lines):
running install
running build
running build_py
package init file 'tools\python\dlib\__init__.py' not found (or not a regular file)
running build_ext
Traceback (most recent call last):
File "C:\Users\Bruger\AppData\Local\Temp\pip-install-hoq7h4eo\dlib\setup.py", line 120, in get_cmake_version
out = subprocess.check_output(['cmake', '--version'])
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 489, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
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\Bruger\AppData\Local\Temp\pip-install-hoq7h4eo\dlib\setup.py", line 223, in <module>
setup(
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\site-packages\setuptools\__init__.py", line 165, in setup
return distutils.core.setup(**attrs)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Bruger\AppData\Local\Temp\pip-install-hoq7h4eo\dlib\setup.py", line 129, in run
cmake_version = self.get_cmake_version()
File "C:\Users\Bruger\AppData\Local\Temp\pip-install-hoq7h4eo\dlib\setup.py", line 122, in get_cmake_version
raise RuntimeError("\n*******************************************************************\n" +
RuntimeError:
*******************************************************************
CMake must be installed to build the following extensions: _dlib_pybind11
*******************************************************************
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\Bruger\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Bruger\\AppData\\Local\\Temp\\pip-install-hoq7h4eo\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Bruger\\AppData\\Local\\Temp\\pip-install-hoq7h4eo\\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\Bruger\AppData\Local\Temp\pip-record-w68bakhl\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\Bruger\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Include\dlib' Check the logs for full command output.
Looks like you're missing a library that's required to build your dependencies.
CMake must be installed to build the following extensions: _dlib_pybind11
Install CMake and try installing face_recognition again.
It looks like you don't have the required Libraries
Run pip install cmake , and then pip install dlib. I guess now you will no longer receive the error...
This will install the requirements.

How to use pydensecrf in Python3.7?

I am running the following python code
import numpy as np
import pydensecrf.densecrf as dcrf
import matplotlib.pyplot as plt
which results in
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-4-cbaa174fb5e7> in <module>
1 import numpy as np
----> 2 import pydensecrf.densecrf as dcrf
3 import matplotlib.pyplot as plt
ModuleNotFoundError: No module named 'pydensecrf'
I have tried installing: pip install pydensecrf
But whenever I do, i get the following error
C:\Users\Aparajita Das>pip install pydensecrf
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/pydensecrf/
Collecting pydensecrf
Using cached pydensecrf-1.0rc3.tar.gz (1.0 MB)
Building wheels for collected packages: pydensecrf
Building wheel for pydensecrf (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Aparajita Das\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\APARAJ~1\\AppData\\Local\\Temp\\pip-install-pqhh72by\\pydensecrf\\setup.py'"'"'; __file__='"'"'C:\\Users\\APARAJ~1\\AppData\\Local\\Temp\\pip-install-pqhh72by\\pydensecrf\\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\APARAJ~1\AppData\Local\Temp\pip-wheel-v3toa6sn'
cwd: C:\Users\APARAJ~1\AppData\Local\Temp\pip-install-pqhh72by\pydensecrf\
Complete output (44 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\pydensecrf
copying pydensecrf\utils.py -> build\lib.win-amd64-3.7\pydensecrf
copying pydensecrf\__init__.py -> build\lib.win-amd64-3.7\pydensecrf
running build_ext
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\APARAJ~1\AppData\Local\Temp\pip-install-pqhh72by\pydensecrf\setup.py", line 41, in <module>
"Topic :: Scientific/Engineering :: Artificial Intelligence",
File "C:\Users\Aparajita Das\Anaconda3\lib\site-packages\setuptools\__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Aparajita Das\Anaconda3\lib\site-packages\wheel\bdist_wheel.py", line 223, in run
self.run_command('build')
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Aparajita Das\Anaconda3\lib\site-packages\setuptools\command\build_ext.py", line 87, in run
_build_ext.run(self)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\command\build_ext.py", line 309, in run
force=self.force)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\ccompiler.py", line 1031, in new_compiler
return klass(None, dry_run, force)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\cygwinccompiler.py", line 285, in __init__
CygwinCCompiler.__init__ (self, verbose, dry_run, force)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\cygwinccompiler.py", line 129, in __init__
if self.ld_version >= "2.10.90":
TypeError: '>=' not supported between instances of 'NoneType' and 'str'
----------------------------------------
ERROR: Failed building wheel for pydensecrf
Running setup.py clean for pydensecrf
Failed to build pydensecrf
Installing collected packages: pydensecrf
Running setup.py install for pydensecrf ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Aparajita Das\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\APARAJ~1\\AppData\\Local\\Temp\\pip-install-pqhh72by\\pydensecrf\\setup.py'"'"'; __file__='"'"'C:\\Users\\APARAJ~1\\AppData\\Local\\Temp\\pip-install-pqhh72by\\pydensecrf\\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\APARAJ~1\AppData\Local\Temp\pip-record-tms9_lds\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Aparajita Das\Anaconda3\Include\pydensecrf'
cwd: C:\Users\APARAJ~1\AppData\Local\Temp\pip-install-pqhh72by\pydensecrf\
Complete output (46 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\pydensecrf
copying pydensecrf\utils.py -> build\lib.win-amd64-3.7\pydensecrf
copying pydensecrf\__init__.py -> build\lib.win-amd64-3.7\pydensecrf
running build_ext
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\APARAJ~1\AppData\Local\Temp\pip-install-pqhh72by\pydensecrf\setup.py", line 41, in <module>
"Topic :: Scientific/Engineering :: Artificial Intelligence",
File "C:\Users\Aparajita Das\Anaconda3\lib\site-packages\setuptools\__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Aparajita Das\Anaconda3\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Aparajita Das\Anaconda3\lib\site-packages\setuptools\command\build_ext.py", line 87, in run
_build_ext.run(self)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\command\build_ext.py", line 309, in run
force=self.force)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\ccompiler.py", line 1031, in new_compiler
return klass(None, dry_run, force)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\cygwinccompiler.py", line 285, in __init__
CygwinCCompiler.__init__ (self, verbose, dry_run, force)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\cygwinccompiler.py", line 129, in __init__
if self.ld_version >= "2.10.90":
TypeError: '>=' not supported between instances of 'NoneType' and 'str'
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\Aparajita Das\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\APARAJ~1\\AppData\\Local\\Temp\\pip-install-pqhh72by\\pydensecrf\\setup.py'"'"'; __file__='"'"'C:\\Users\\APARAJ~1\\AppData\\Local\\Temp\\pip-install-pqhh72by\\pydensecrf\\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\APARAJ~1\AppData\Local\Temp\pip-record-tms9_lds\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Aparajita Das\Anaconda3\Include\pydensecrf' Check the logs for full command output.
I am using Python 3.7.3 and I have cpython installed. I have checked everywhere and no solution is working for me. I have tried downgrading python, thinking it might work for older version using the following but it does not even downgrade it to the given version.
conda install python=3.5.0
How do I solve this?
For me installation failed with error: command 'gcc' failed with exit status 1.
This worked for me:
pip install cython
pip install git+https://github.com/lucasb-eyer/pydensecrf.git
Installing cython is the first thing you need to try out.That alone didn't work for me.Combination of both worked like a charm.
Referred to the comments at https://github.com/lucasb-eyer/pydensecrf/issues/78
Step1: download package of pydensecrf compatible with python version from link https://anaconda.org/conda-forge/pydensecrf/files?version=1.0rc2&page=2
Step2: Extract the package and copy two subfolders "pydensecrf and pydensecrf-1.0rc2.dist-info" in folder "Lib" to installed folder of python (Example: C:\Python 3.6\Lib\site-packages)

I am having trouble installing dlib for my project

C:\python\Scripts>pip install dlib
Collecting dlib
Using cached dlib-19.19.0.tar.gz (3.2 MB)
Installing collected packages: dlib
Running setup.py install for dlib ... error
ERROR: Command errored out with exit status 1:
command: 'c:\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Work\\AppData\\Local\\Temp\\pip-install-m0sdf_bv\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Work\\AppData\\Local\\Temp\\pip-install-m0sdf_bv\\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\Work\AppData\Local\Temp\pip-record-alg_6b9y\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python\Include\dlib'
cwd: C:\Users\Work\AppData\Local\Temp\pip-install-m0sdf_bv\dlib\
Complete output (47 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:\python\lib\runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\python\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\python\Scripts\cmake.exe\__main__.py", line 4, in <module>
ModuleNotFoundError: No module named 'cmake'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Work\AppData\Local\Temp\pip-install-m0sdf_bv\dlib\setup.py", line 223, in <module>
setup(
File "c:\python\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "c:\python\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\python\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\python\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\python\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\python\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "c:\python\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\python\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\python\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Work\AppData\Local\Temp\pip-install-m0sdf_bv\dlib\setup.py", line 129, in run
cmake_version = self.get_cmake_version()
File "C:\Users\Work\AppData\Local\Temp\pip-install-m0sdf_bv\dlib\setup.py", line 120, in get_cmake_version
out = subprocess.check_output(['cmake', '--version'])
File "c:\python\lib\subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "c:\python\lib\subprocess.py", line 512, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['cmake', '--version']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Work\\AppData\\Local\\Temp\\pip-install-m0sdf_bv\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Work\\AppData\\Local\\Temp\\pip-install-m0sdf_bv\\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\Work\AppData\Local\Temp\pip-record-alg_6b9y\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python\Include\dlib' Check the logs for full command output.
This is the error that comes when i run pip install dlib

Error While Installing Face_recognition in python3.5.2 windows 10?

I already have dlib 19.1.0 and open cv 3.4.5 and numpy,scipy packages with advanced version but by using
pip install face_recognition
im getting following errors..Please can anyone help me what i did wrongly..
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: numpy in c:\python35\lib\site-packages (from face_recognition) (1.15.4)
Collecting dlib>=19.7 (from face_recognition)
Using cached https://files.pythonhosted.org/packages/35/8d/e4ddf60452e2fb1ce3164f774e68968b3f110f1cb4cd353235d56875799e/dlib-19.16.0.tar.gz
Collecting face-recognition-models>=0.3.0 (from face_recognition)
Requirement already satisfied: Click>=6.0 in c:\python35\lib\site-packages (from face_recognition) (7.0)
Requirement already satisfied: Pillow in c:\python35\lib\site-packages (from face_recognition) (5.4.1)
Building wheels for collected packages: dlib
Running setup.py bdist_wheel for dlib ... error
Complete output from command c:\python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-rqlch36v\\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\Admin\AppData\Local\Temp\pip-wheel-de03y7mf --python-tag cp35:
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:\python35\lib\runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "c:\python35\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\python35\Scripts\cmake.exe\__main__.py", line 5, in <module>
ImportError: cannot import name 'cmake'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Admin\AppData\Local\Temp\pip-install-rqlch36v\dlib\setup.py", line 257, in <module>
'Topic :: Software Development',
File "c:\python35\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\python35\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\python35\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\python35\lib\site-packages\wheel\bdist_wheel.py", line 188, in run
self.run_command('build')
File "c:\python35\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python35\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\python35\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\python35\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python35\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Admin\AppData\Local\Temp\pip-install-rqlch36v\dlib\setup.py", line 127, in run
cmake_version = self.get_cmake_version()
File "C:\Users\Admin\AppData\Local\Temp\pip-install-rqlch36v\dlib\setup.py", line 118, in get_cmake_version
out = subprocess.check_output(['cmake', '--version'])
File "c:\python35\lib\subprocess.py", line 626, in check_output
**kwargs).stdout
File "c:\python35\lib\subprocess.py", line 708, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['cmake', '--version']' 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-models, face-recognition
Found existing installation: dlib 19.1.0
Uninstalling dlib-19.1.0:
Successfully uninstalled dlib-19.1.0
Running setup.py install for dlib ... error
Complete output from command c:\python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-rqlch36v\\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\Admin\AppData\Local\Temp\pip-record-tjyw2jml\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
Traceback (most recent call last):
File "c:\python35\lib\runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "c:\python35\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\python35\Scripts\cmake.exe\__main__.py", line 5, in <module>
ImportError: cannot import name 'cmake'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Admin\AppData\Local\Temp\pip-install-rqlch36v\dlib\setup.py", line 257, in <module>
'Topic :: Software Development',
File "c:\python35\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\python35\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\python35\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\python35\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\python35\lib\distutils\command\install.py", line 539, in run
self.run_command('build')
File "c:\python35\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python35\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\python35\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\python35\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python35\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Admin\AppData\Local\Temp\pip-install-rqlch36v\dlib\setup.py", line 127, in run
cmake_version = self.get_cmake_version()
File "C:\Users\Admin\AppData\Local\Temp\pip-install-rqlch36v\dlib\setup.py", line 118, in get_cmake_version
out = subprocess.check_output(['cmake', '--version'])
File "c:\python35\lib\subprocess.py", line 626, in check_output
**kwargs).stdout
File "c:\python35\lib\subprocess.py", line 708, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['cmake', '--version']' returned non-zero exit status 1
----------------------------------------
Rolling back uninstall of dlib
Command "c:\python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-rqlch36v\\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\Admin\AppData\Local\Temp\pip-record-tjyw2jml\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Admin\AppData\Local\Temp\pip-install-rqlch36v\dlib\
Actually i tried with some other installation keywords and tried to rectified error but 'm getting same errors when i used pip install face_recognition and my python version is 3.5.2 and i tried with wheel files also with specified version of python and face_recognition.
Following wheel files are i have tried wheel files..
https://pypi.org/simple/face-recognition/
Hello for this problem make this
step 1:
pip install cmake dlib
step 2:
pip install face-recognition
If you have the problem by dlib check this
sudo apt install python3-dev

Categories

Resources