简体   繁体   English

Pip3 无法在 macOS 上安装 face_recognition

[英]Pip3 can't install face_recognition on macOS

On macOS I ran this command in Terminal:在 macOS 上,我在终端中运行此命令:

sudo pip3 install face_recognition

It started installing and then threw this error:它开始安装,然后抛出此错误:

ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize;错误:命令出错,退出状态为 1:/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-75ks5d9l/dlib/setup.py'"'"'; sys.argv[0] = '"'"'/private/tmp/pip-install-75ks5d9l/dlib/setup.py'"'"'; file ='"'"'/private/tmp/pip-install-75ks5d9l/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 /private/tmp/pip-record-bze0mci9/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/dlib Check the logs for full command output. file ='"'"'/private/tmp/pip-install-75ks5d9l/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 /private/tmp/pip-record-bze0mci9/install-record.txt --single-version-externally-managed - -compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/dlib 检查日志以获取完整的命令输出。

I read a suggestion about installing dlib first which also threw an error.我阅读了关于首先安装dlib的建议,这也引发了错误。 How can I fix this?我怎样才能解决这个问题?

首先使用以下命令安装cmake

pip3 install cmake

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM