(base) PS C:\dlib-19.23> cd c:\Users\Donggue
(base) PS C:\Users\Donggue> pip install opencv-contrib-python dlib
Collecting opencv-contrib-python
Using cached opencv_contrib_python-4.5.5.64-cp36-abi3-win_amd64.whl (42.2 MB)
Collecting dlib
Using cached dlib-19.23.1.tar.gz (7.4 MB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy>=1.19.3 in c:\users\donggue\anaconda3\lib\site-packages (from opencv-contrib-python) (1.20.3)
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
...
(base) PS C:\dlib-19.23> cd c:\Users\Donggue
(base) PS C:\Users\Donggue> pip install opencv-contrib-python dlib
Collecting opencv-contrib-python
Using cached opencv_contrib_python-4.5.5.64-cp36-abi3-win_amd64.whl (42.2 MB)
Collecting dlib
Using cached dlib-19.23.1.tar.gz (7.4 MB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy>=1.19.3 in c:\users\donggue\anaconda3\lib\site-packages (from opencv-contrib-python) (1.20.3)
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
...
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '/m']' returned non-zero exit status 1.
[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.
我正在尝试使用anaconda安装dlib。我输入pip install dlib
和conda
,用于在anaconda提示符上安装dilb。我还安装了cmake。我的python verison是3.9.7。我还在dlib.net下载了dlib。并输入"py setup.py build“和"py setup.py install”。
发布于 2022-07-18 22:15:40
你安装了Cmake了吗?如果没有,请尝试运行conda install -c anaconda cmake
在那之后,conda install -c conda-forge dlib
https://stackoverflow.com/questions/71658399
复制相似问题