尝试
pip install face_recognition
经常得到
Building wheel for dlib (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\python3\python.exe' -u -c 'import sys, setuptools, tokenize;
sys.argv[0] = '"'"'C:\\Users\\sibaram\\AppData\\Local\\Temp\\pip-install-
g_9ue9sm\\dlib\\setup.py'"'"';
__file__='"'"'C:\\Users\\sibaram\\AppData\\Local\\Temp\\pip-install-
g_9ue9sm\\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\sibaram\AppData\Local\Temp\pip-wheel-gry85yjz' --
python-tag cp37
cwd: C:\Users\sibaram\AppData\Local\Temp\pip-install-g_9ue9sm\dlib\
Complete output (78 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.1 (v3.7.1:260ec2c36a, Oct 20 2018,
14:05:16) [MSC v.1915 32 bit (Intel)]
Invoking CMake setup: 'cmake C:\Users\sibaram\AppData\Local\Temp\pip-
install-g_9ue9sm\dlib\tools\python -
DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\sibaram\AppData\Local\Temp\pip-
install-g_9ue9sm\dlib\build\lib.win32-3.7 -
DPYTHON_EXECUTABLE=c:\python3\python.exe -
DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\sibaram\
AppData\Local\Temp\pip-install-g_9ue9sm\dlib\build\lib.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/sibaram/AppData/Local/Temp/pip-install-
g_9ue9sm/dlib/build/temp.win32-3.7/Release/CMakeFiles/CMakeOutput.log".
See also "C:/Users/sibaram/AppData/Local/Temp/pip-install-
g_9ue9sm/dlib/build/temp.win32-3.7/Release/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\sibaram\AppData\Local\Temp\pip-install-
g_9ue9sm\dlib\setup.py", line 261, in <module>
'Topic :: Software Development',
File "c:\python3\lib\site-packages\setuptools\__init__.py", line 129, in
setup
return distutils.core.setup(**attrs)
File "c:\python3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\python3\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\python3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\python3\lib\site-packages\wheel\bdist_wheel.py", line 192, in run
self.run_command('build')
File "c:\python3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\python3\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\python3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\sibaram\AppData\Local\Temp\pip-install-
g_9ue9sm\dlib\setup.py", line 135, in run
self.build_extension(ext)
File "C:\Users\sibaram\AppData\Local\Temp\pip-install-g_9ue9sm\dlib\setup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "c:\python3\lib\subprocess.py", line 341, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\sibaram\\AppData\\Local\\Temp\\pip-install-g_9ue9sm\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\sibaram\\AppData\\Local\\Temp\\pip-install-g_9ue9sm\\dlib\\build\\lib.win32-3.7', '-DPYTHON_EXECUTABLE=c:\\python3\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\sibaram\\AppData\\Local\\Temp\\pip-install-g_9ue9sm\\dlib\\build\\lib.win32-3.7']' returned non-zero exit status 1.
错误:dlib的构建轮失败 为dlib运行setup.py clean 无法建立dlib 安装收集的软件包:dlib,面部识别 正在运行dlib的setup.py install ...错误 错误:命令错误,退出状态为1: 命令:'c:\ python3 \ python.exe'-u -c'导入sys,setuptools,令牌化; sys.argv [0] ='“'”'C:\ Users \ sibaram \ AppData \ Local \ Temp \ pip-install-g_9ue9sm \ dlib \ setup.py'“”“ ;; 文件 ='“'”'C:\ Users \ sibaram \ AppData \ Local \ Temp \ pip-install-g_9ue9sm \ dlib \ setup.py'“'”'; f = getattr(tokenize, '“”“'open'”'“,打开)(文件); code = f.read()。replace('”'“'\ r \ n'”'“', '“'”'\\ n'“'”'); f.close(); exec(compile(code, file ,'“'”'exec'“'”')))'安装--record'C:\ Users \ sibaram \ AppData \ Local \ Temp \ pip-record-hnx7uqdv \ install-record.txt'-单一版本-外部管理--compile CWD:C:\ Users \ sibaram \ AppData \ Local \ Temp \ pip-install-g_9ue9sm \ dlib \ 完整输出(80行): 运行安装 运行构建 运行build_py 找不到包初始化文件“ dlib__init __。py”(或非常规文件) 运行build_ext 适用于Python 3.7.1的构建扩展(v3.7.1:260ec2c36a,2018年10月20日,14:05:16)[MSC v.1915 32位(Intel)] 调用CMake设置:'cmake C:\ Users \ sibaram \ AppData \ Local \ Temp \ pip-install-g_9ue9sm \ dlib \ tools \ python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY = C:\ Users \ sibaram \ AppData \ Local \ Temp \ pip-install- g_9ue9sm \ dlib \ build \ lib.win32-3.7 -DPYTHON_EXECUTABLE = c:\ python3 \ python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE = C:\ Users \ sibaram \ AppData \ Local \ Temp \ pip-install-g_9ue9sm \ dlib \ build \ lib。 win32-3.7' -构建:NMake Makefiles -C编译器标识未知 -CXX编译器标识未知 CMakeLists.txt中的CMake错误: 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/sibaram/AppData/Local/Temp/pip-install-g_9ue9sm/dlib/build/temp.win32-3.7/Release/CMakeFiles/CMakeOutput.log".
See also "C:/Users/sibaram/AppData/Local/Temp/pip-install-g_9ue9sm/dlib/build/temp.win32-3.7/Release/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\sibaram\AppData\Local\Temp\pip-install-g_9ue9sm\dlib\setup.py", line 261, in <module>
'Topic :: Software Development',
File "c:\python3\lib\site-packages\setuptools\__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "c:\python3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\python3\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\python3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\python3\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\python3\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "c:\python3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\python3\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\python3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\sibaram\AppData\Local\Temp\pip-install-g_9ue9sm\dlib\setup.py", line 135, in run
self.build_extension(ext)
File "C:\Users\sibaram\AppData\Local\Temp\pip-install-g_9ue9sm\dlib\setup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "c:\python3\lib\subprocess.py", line 341, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\sibaram\\AppData\\Local\\Temp\\pip-install-g_9ue9sm\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\sibaram\\AppData\\Local\\Temp\\pip-install-g_9ue9sm\\dlib\\build\\lib.win32-3.7', '-DPYTHON_EXECUTABLE=c:\\python3\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\sibaram\\AppData\\Local\\Temp\\pip-install-g_9ue9sm\\dlib\\build\\lib.win32-3.7']' returned non-zero exit status 1.
----------------------------------------
错误:命令错误,退出状态为1:'c:\ python3 \ python.exe'-u -c'import sys,setuptools,tokenize; sys.argv [0] ='“'”'C:\ Users \ sibaram \ AppData \ Local \ Temp \ pip-install-g_9ue9sm \ dlib \ setup.py'“”“ ;; 文件 ='“'”'C:\ Users \ sibaram \ AppData \ Local \ Temp \ pip-install-g_9ue9sm \ dlib \ setup.py'“'”'; f = getattr(tokenize, '“”“'open'”'“,打开)(文件); code = f.read()。replace('”'“'\ r \ n'”'“', '“'”'\\ n'“'”'); f.close(); exec(compile(code, file ,'“'”'exec'“'”')))'安装--record'C:\ Users \ sibaram \ AppData \ Local \ Temp \ pip-record-hnx7uqdv \ install-record.txt'--single-version-externally-managed --compile检查日志以获取完整的命令输出。 / p>