Open talhakabakus opened 5 years ago
Is cmake installed?
Face_recognition is not officially supported on Windows, but you can install it with cmake installed (can be installed with pip). Might not be the issue, worth checking.
Yes, CMake
is already installed.
I faced the same problem when trying to install dlib inside a virtual environment. Can you try installing without the virtual environment and see!
I faced the same problem when trying to install dlib inside a virtual environment. Can you try installing without the virtual environment and see!
Did you solve the problem??
I suggested a method which worked for me. Kindly review with the issue creator for updates. Thank you.
Solved the problem for me in MacOS 10.14.6. Thanks!
(opencv-env) C:\Users\huuthoang>pip install face_recognition Requirement already satisfied: face_recognition in c:\users\huuthoang\appdata\local\continuum\anaconda3\envs\opencv-env\lib\site-packages (1.3.0) Collecting dlib>=19.7 Using cached dlib-19.19.0.tar.gz (3.2 MB) Requirement already satisfied: face-recognition-models>=0.3.0 in c:\users\huuthoang\appdata\local\continuum\anaconda3\envs\opencv-env\lib\site-packages (from face_recognition) (0.3.0) Requirement already satisfied: Pillow in c:\users\huuthoang\appdata\local\continuum\anaconda3\envs\opencv-env\lib\site-packages (from face_recognition) (7.0.0) Requirement already satisfied: numpy in c:\users\huuthoang\appdata\local\continuum\anaconda3\envs\opencv-env\lib\site-packages (from face_recognition) (1.18.2) Requirement already satisfied: Click>=6.0 in c:\users\huuthoang\appdata\local\continuum\anaconda3\envs\opencv-env\lib\site-packages (from face_recognition) (7.1.1) Building wheels for collected packages: dlib Building wheel for dlib (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\setup.py'"'"'; file='"'"'C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\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\HUUTHO~1\AppData\Local\Temp\pip-wheel-xubwn6f0' cwd: C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\ Complete output (55 lines): running bdist_wheel 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.6 | packaged by conda-forge | (default, Mar 5 2020, 14:47:50) [MSC v.1916 64 bit (AMD64)] Invoking CMake setup: 'cmake C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\build\lib.win-amd64-3.7 -DPYTHON_EXECUTABLE=C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\build\lib.win-amd64-3.7 -A x64' -- Building for: NMake Makefiles CMake Error at CMakeLists.txt:3 (project): Generator
NMake Makefiles
does not support platform specification, but platform
x64
was specified.
ERROR: Failed building wheel for dlib Running setup.py clean for dlib Failed to build dlib ERROR: Error checking for conflicts. Traceback (most recent call last): File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\pip_vendor\pkg_resources__init.py", line 3021, in _dep_map return self.dep_map File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\pip_vendor\pkg_resources__init.py", line 2815, in getattr__ raise AttributeError(attr) AttributeError: _DistInfoDistribution__dep_map
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\pip_vendor\pkg_resources__init__.py", line 3012, in _parsed_pkg_info return self._pkg_info File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\pip_vendor\pkg_resources__init.py", line 2815, in getattr__ raise AttributeError(attr) AttributeError: _pkg_info
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\pip_internal\commands\install.py", line 517, in _warn_about_conflicts package_set, _dep_info = check_install_conflicts(to_install) File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\pip_internal\operations\check.py", line 114, in check_install_conflicts packageset, = create_package_set_from_installed() File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\pip_internal\operations\check.py", line 53, in create_package_set_from_installed package_set[name] = PackageDetails(dist.version, dist.requires()) File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\pip_vendor\pkg_resources__init.py", line 2736, in requires dm = self._dep_map File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\pip_vendor\pkg_resources__init.py", line 3023, in _dep_map self.dep_map = self._compute_dependencies() File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\pip_vendor\pkg_resources__init.py", line 3032, in _compute_dependencies for req in self._parsed_pkg_info.get_all('Requires-Dist') or []: File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\pip_vendor\pkg_resources__init__.py", line 3014, in _parsed_pkg_info metadata = self.get_metadata(self.PKG_INFO) File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\pip_vendor\pkg_resources\init.py", line 1420, in get_metadata value = self._get(path) File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\pip_vendor\pkg_resources\init__.py", line 1616, in _get with open(path, 'rb') as stream: FileNotFoundError: [Errno 2] No such file or directory: 'c:\users\huuthoang\appdata\local\continuum\anaconda3\envs\opencv-env\lib\site-packages\parso-0.6.2.dist-info\METADATA' Installing collected packages: dlib Running setup.py install for dlib ... error ERROR: Command errored out with exit status 1: command: 'C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\setup.py'"'"'; file='"'"'C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\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\HUUTHO~1\AppData\Local\Temp\pip-record-77juuwz4\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\Include\dlib' cwd: C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\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) running build_ext Building extension for Python 3.7.6 | packaged by conda-forge | (default, Mar 5 2020, 14:47:50) [MSC v.1916 64 bit (AMD64)] Invoking CMake setup: 'cmake C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\build\lib.win-amd64-3.7 -DPYTHON_EXECUTABLE=C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\build\lib.win-amd64-3.7 -A x64' -- Building for: NMake Makefiles CMake Error at CMakeLists.txt:3 (project): Generator
NMake Makefiles
does not support platform specification, but platform
x64
was specified.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "C:/Users/huuthoang/AppData/Local/Temp/pip-install-k7rhtn03/dlib/build/temp.win-amd64-3.7/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\setup.py", line 261, in <module>
'Topic :: Software Development',
File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\setuptools\__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\setup.py", line 135, in run
self.build_extension(ext)
File "C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\setup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\lib\subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\HUUTHO~1\\AppData\\Local\\Temp\\pip-install-k7rhtn03\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\HUUTHO~1\\AppData\\Local\\Temp\\pip-install-k7rhtn03\\dlib\\build\\lib.win-amd64-3.7', '-DPYTHON_EXECUTABLE=C:\\Users\\huuthoang\\AppData\\Local\\Continuum\\anaconda3\\envs\\opencv-env\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\HUUTHO~1\\AppData\\Local\\Temp\\pip-install-k7rhtn03\\dlib\\build\\lib.win-amd64-3.7', '-A', 'x64']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\dlib\setup.py'"'"'; file='"'"'C:\Users\HUUTHO~1\AppData\Local\Temp\pip-install-k7rhtn03\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\HUUTHO~1\AppData\Local\Temp\pip-record-77juuwz4\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\huuthoang\AppData\Local\Continuum\anaconda3\envs\opencv-env\Include\dlib' Check the logs for full command output. how to fix?
1.2.3
3.7.3
Windows 10 1903
Description
Unable to install
dlib
viapip3
despite meeting the requirements.What I Did