我无法在 python 3.10 中安装人脸识别 我尝试了更多次来安装 cmake 和 dlib 和人脸识别但失败了
错误
错误
错误
错误
C:\Users\data2\face_detection> pip install opencv
ERROR: Could not find a version that satisfies the requirement opencv (from versions: none)
ERROR: No matching distribution found for opencv
PS C:\Users\data2\face_detection> pip3 install face_recognition
Collecting face_recognition
Using cached face_recognition-1.3.0-py2.py3-none-any.whl (15 kB)
Collecting numpy
Using cached numpy-1.24.2-cp310-cp310-win_amd64.whl (14.8 MB)
Requirement already satisfied: face-recognition-models>=0.3.0 in c:\users\data2\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from face_recognition) (0.3.0)
Collecting Pillow
Using cached Pillow-9.4.0-cp310-cp310-win_amd64.whl (2.5 MB)
Collecting Click>=6.0
Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting dlib>=19.7
Using cached dlib-19.24.0.tar.gz (3.2 MB)
Preparing metadata (setup.py) ... done
Collecting colorama
Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)
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, Pillow, numpy, colorama, Click, 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]
我尝试的代码