我可以通过anaconda安装python dlib

发布于 2025-01-17 12:32:42 字数 2043 浏览 0 评论 0原文

(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 dlibconda 在 anaconda 提示符下安装 dilb。我还安装了cmake。我的Python版本是3.9.7。 我还在 dlib.net 下载 dlib。并输入“py setup.py build”和“py setup.py install”

(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.


I'm trying to install dlib using anaconda.
I enter pip install dlib and conda for installing dilb on anaconda prompt. and I also installed cmake. my python verison is 3.9.7.
I also download dlib at dlib.net. and enter "py setup.py build" and "py setup.py install"

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

拥有 2025-01-24 12:32:42

你已经安装了Cmake吗?如果没有,请尝试运行 conda install -c anaconda cmake

然后运行 ​​conda install -c conda-forge dlib

Have you installed Cmake already? If not, try running conda install -c anaconda cmake

And after that conda install -c conda-forge dlib

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文