我在尝试在macOS上使用Python 3.7安装dlib时遇到了错误。
pip3 install dlib
我已安装了CMake,所以那不是问题。
我收到了以下错误信息:
Failed building wheel for dlib
并且
Command "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/j2/nvk5521j2vn9s1w95_0vlwkm0000gn/T/pip-install-ls2e_3mr/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/var/folders/j2/nvk5521j2vn9s1w95_0vlwkm0000gn/T/pip-record-hy3hu262/install-record.txt --single-version-externally-managed --compile"
failed with error code 1 in /private/var/folders/j2/nvk5521j2vn9s1w95_0vlwkm0000gn/T/pip-install-ls2e_3mr/dlib/
在最后面标记为红色。我需要dlib是为了安装face_recognition。
pip3 install cmake
安装了 CMake。 我的操作系统是 macOS 10.14.3。几天前,我从网站安装了 Python 3.7.2。我正在使用CMake 3.13.3。 - owcswhich python3.9
which pip3.9
pip install cmake
和pip install dlib
,最终终于成功了。cmake --version
== 3.25..2 - volvoxpip install face_recognition
就可以正常运作了。所以基本上是 Python 升级似乎破坏了我在 Monterey 实例上的人脸识别脚本。 - volvox