Please install `face_recognition_models` with this command before using `face_recognition`:
时间: 2023-08-07 09:05:51 浏览: 496
I'm sorry, but I cannot execute commands on your system as I am just a language model AI. However, to install `face_recognition_models`, you can try running the following command in your terminal or command prompt:
```
pip install face_recognition_models
```
This should install the necessary package for you to use `face_recognition`.
相关问题
Collecting face_recognition Using cached face_recognition-1.3.0-py2.py3-none-any.whl (15 kB) Requirement already satisfied: Pillow in d:\anaconda\envs\pytorch\lib\site-packages (from face_recognition) (9.4.0) Requirement already satisfied: face-recognition-models>=0.3.0 in d:\anaconda\envs\pytorch\lib\site-packages (from face_recognition) (0.3.0) Collecting dlib>=19.7 Using cached dlib-19.24.1.tar.gz (3.2 MB) Preparing metadata (setup.py) ... done Requirement already satisfied: Click>=6.0 in d:\anaconda\envs\pytorch\lib\site-packages (from face_recognition) (8.1.3) Requirement already satisfied: numpy in d:\anaconda\envs\pytorch\lib\site-packages (from face_recognition) (1.24.2) Requirement already satisfied: colorama in d:\anaconda\envs\pytorch\lib\site-packages (from Click>=6.0->face_recognition) (0.4.6) Building wheels for collected packages: dlib Building wheel for dlib (setup.py) ... error error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [7 lines of output] running bdist_wheel running build running build_py running build_ext ERROR: CMake must be installed to build dlib [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for dlib Running setup.py clean for dlib Failed to build dlib Installing collected packages: dlib, face_recognition Running setup.py install for dlib ... error error: subprocess-exited-with-error × Running setup.py install for dlib did not run successfully. │ exit code: 1 ╰─> [9 lines of output] running install D:\anaconda\envs\pytorch\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py running build_ext ERROR: CMake must be installed to build dlib [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure × Encountered error while trying to install package. ╰─> dlib note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.
这是一个安装dlib和face_recognition库时遇到的错误。根据错误输出,需要安装CMake才能构建dlib。你可以尝试通过以下命令安装CMake:
```
pip install cmake
```
然后再重新安装dlib和face_recognition库即可。
RuntimeError: Unable to open C:\Users\张雪松\PycharmProjects\pythonProject\venv\lib\site-packages\face_recognition_models\models\shape_predictor_68_face_landmarks.dat我该怎么办
这个错误通常是因为缺少必要的文件导致的。你可以尝试重新安装 face_recognition_models 库来解决这个问题。具体步骤如下:
1. 打开终端或命令提示符,进入你的 Python 虚拟环境;
2. 运行以下命令卸载 face_recognition_models 库:
```
pip uninstall face_recognition_models
```
3. 运行以下命令重新安装 face_recognition_models 库:
```
pip install face_recognition_models
```
如果重新安装 face_recognition_models 库后仍然出现相同的错误,请检查文件路径是否正确,并确保文件存在。
阅读全文