最近在尝试运行一个github上很火的人脸识别项目,传送门-->https://github.com/ageitgey/face_recognition,不过在安装项目所需的一些包时出现了错误。
首先是dlib包,直接 pip install dlib会报错:
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting dlib
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/05/57/e8a8caa3c89a27f80bc78da39c423e2553f482a3705adc619176a3a24b36/dlib-19.17.0.tar.gz (3.4MB)
|████████████████████████████████| 3.4MB 1.6MB/s
Building wheels for collected packages: dlib
Building wheel for dlib (setup.py) ... error
ERROR: Complete output from command 'D:\Anaconda3\envs\python36\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\fengzhao\\AppData\\Local\\Temp\\pip-install-0r7ug9qd\\dlib\\setup.p
y'"'"';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\fengzhao\App
Data\Local\Temp\pip-wheel-s4lri21e' --python-tag cp36:
ERROR: 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.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 14:00:49) [MSC v.1915 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\fengzhao\AppData\Local\Temp\pip-install-0r7ug9qd\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\fengzhao\AppData\Local\Temp\pip-install-0r7ug9qd\dlib\bu
ild\lib.win-amd64-3.6 -DPYTHON_EXECUTABLE=D:\Anaconda3\envs\python36\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\fengzhao\AppData\Local\Temp\pip-install-0r7ug9qd\dlib\build\lib.win-amd64-3
.6 -A x64'
-- Building for: NMake Makefiles
CMake Error in CMakeLists.txt:
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/fengzhao/AppData/Local/Temp/pip-install-0r7ug9qd/dlib/build/temp.win-amd64-3.6/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1,