我如何在fedora 30上安装dlib? [英] How do i install dlib on fedora 30?

查看:186
本文介绍了我如何在fedora 30上安装dlib?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将face_recognition模块用于一个爱好项目.然后我从GitHub下载源代码并将其放在我的项目文件夹中.效果很好.

I'm using the face_recognition module for a hobby project. And i download the source code from GitHub and put it in my project folder. It works fine.

如何在fedora 30上正确安装dlib?

How do i properly install dlib on fedora 30?

我尝试通过pip和anaconda安装dlib,但均无效.

I tried installing dlib through pip and anaconda, neither worked.

推荐答案

快速安装

它位于Conda Forge上,因此您可以使用

Quick Install

It's on Conda Forge, so you can use

conda install -c conda-forge dlib

推荐做法

更好的是,使用YAML并为您的项目创建一个新的环境.例如,如果您只想运行一个最小的env face_recognition,那么以下YAML就足够了:

Recommended Practice

Even better, use a YAML and create a new env for your project. For example, if you want a minimal env just to run face_recognition then the following YAML would be sufficient:

name: face_rec
channels:
 - conda-forge
dependencies:
 - python=3.7
 - click>=6.0
 - dlib>=19.7
 - numpy
 - pillow
 - cmake
 - pip
 - pip:
   -  -e git+ssh://git@github.com/ageitgey/face_recognition.git#egg=face_recognition

然后创建如下环境:

conda env create -n my_env -f face_rec.yaml

其中my_env是您要命名的名称.您可以将所需的其他任何软件包自由添加到其中.另外,如果您确实想要完整的Anaconda Python发行版+人脸识别,请用anaconda替换python=3.7.但是,将需要更长的时间来解决.

where my_env is whatever you want to name it. You can freely add whatever other packages you anticipate needing into this. Alternatively, if you really do want a full Anaconda Python distribution + face-recognition, then replace the python=3.7 with just anaconda. It will take significantly longer to solve, though.

最后,这是使用Conda的最佳实践,尤其是从PyPI/GitHub安装软件包时.请参阅" 在Conda环境中使用Pip "以获取详细信息.

In the end, this is the best practice for working with with Conda, especially when you install packages from PyPI/GitHub. See "Using Pip in a Conda Environment" for details.

这篇关于我如何在fedora 30上安装dlib?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆