如何在 github 上构建 FaceDetect/cnn_face_detection 项目?
How to build FaceDetect/cnn_face_detection project on github?
我想使用存储在 Github 存储库中的 https://github.com/FaceDetect/cnn_face_detection 项目,但它显示了太多不同的文件并且没有合适的文档可用。谁能告诉我如何将 github 项目构建成可执行文件?
如果 github 项目有 releases
或 tag
,例如 tornado releases on github。
那你可以运行
pip install https://github.com/project_name/archive/version.tar.gz
像这样:
pip install https://github.com/tornadoweb/tornado/archive/v4.3.0.tar.gz
安装 github 在线项目。
但是当项目没有release
选项卡时。您需要克隆项目并从源代码编译。
在大多数情况下,您可以运行 python setup.py install
。
问题有一个 python 标签。所以以python项目为例
GitHub is mostly used for code. in various languages
如何使任何 github 项目可用或可执行取决于语言和项目本身的类型。
另外 need to be careful with the license terms, the state of reliability and completeness of the project you intend to work on (i.e: github.com/leezivin/FaceDetection_CNN – snakecharmerb); The fact that the specific project you mention, at the time, do not have a README.md and a license file jet , let's suggest to contact the author or someone contribute/commit the sources 了解更多信息。
顺便说一下,您提到的项目似乎是一个 c++ 语言 项目;所以你需要能够以某种形式的可执行文件编译和link它(Clean an Rebuid); The specific repo: cnn_face_detection 包含 Visual Studio 解决方案和项目,因此最简单的方法是使用 Visual Studio 和 open/import 工件(这取决于您最终可以使用的 visual studio 版本).
还需要:
- 选择您是否打算信任(或不信任)代码:
- 注意 prj 引用的依赖项的路径,因为 可能 如果您自己克隆(下载)源代码,它们可能需要更改为实际路径文件系统。如果不这样做,您可能无法编译解决方案(即 repo 中包含的三个项目):
通过查看项目,您会发现名为 "VC2010" 和 "VC2006" 的文件夹。这是一个很好的线索,表明这是一个基于 Microsoft Visual C(或 Visual Studio)的项目。在里面你会找到.sln和.vcxproj文件,根据this list
,它们是"solution"和"project"文件
从 here 下载并安装 Visual Studio。有几个选项,先试试社区版。
从github下载项目的源代码。为了简单起见,您可以使用项目主页上的 "Download ZIP" 按钮。
运行 Visual Studio 并按照 these directions 打开解决方案 (.sln) 文件之一:
- 在“文件”菜单上,单击“打开解决方案”。 “打开解决方案”对话框打开。
- 导航到您想要的解决方案。
- 单击解决方案文件夹,这将显示并选择文件夹中的解决方案文件。如果看不到任何解决方案文件,请验证文件类型列表框中的值是否为解决方案文件。
- 单击“打开”。
使用 these instructions 构建。此时你要么有一个 .exe 要么有一个 .dll(取决于你正在构建的项目)。
我想使用存储在 Github 存储库中的 https://github.com/FaceDetect/cnn_face_detection 项目,但它显示了太多不同的文件并且没有合适的文档可用。谁能告诉我如何将 github 项目构建成可执行文件?
如果 github 项目有 releases
或 tag
,例如 tornado releases on github。
那你可以运行
pip install https://github.com/project_name/archive/version.tar.gz
像这样:
pip install https://github.com/tornadoweb/tornado/archive/v4.3.0.tar.gz
安装 github 在线项目。
但是当项目没有release
选项卡时。您需要克隆项目并从源代码编译。
在大多数情况下,您可以运行 python setup.py install
。
问题有一个 python 标签。所以以python项目为例
GitHub is mostly used for code. in various languages
如何使任何 github 项目可用或可执行取决于语言和项目本身的类型。
另外 need to be careful with the license terms, the state of reliability and completeness of the project you intend to work on (i.e: github.com/leezivin/FaceDetection_CNN – snakecharmerb); The fact that the specific project you mention, at the time, do not have a README.md and a license file jet , let's suggest to contact the author or someone contribute/commit the sources 了解更多信息。
顺便说一下,您提到的项目似乎是一个 c++ 语言 项目;所以你需要能够以某种形式的可执行文件编译和link它(Clean an Rebuid); The specific repo: cnn_face_detection 包含 Visual Studio 解决方案和项目,因此最简单的方法是使用 Visual Studio 和 open/import 工件(这取决于您最终可以使用的 visual studio 版本).
还需要:
- 选择您是否打算信任(或不信任)代码:
- 注意 prj 引用的依赖项的路径,因为 可能 如果您自己克隆(下载)源代码,它们可能需要更改为实际路径文件系统。如果不这样做,您可能无法编译解决方案(即 repo 中包含的三个项目):
通过查看项目,您会发现名为 "VC2010" 和 "VC2006" 的文件夹。这是一个很好的线索,表明这是一个基于 Microsoft Visual C(或 Visual Studio)的项目。在里面你会找到.sln和.vcxproj文件,根据this list
,它们是"solution"和"project"文件
从 here 下载并安装 Visual Studio。有几个选项,先试试社区版。
从github下载项目的源代码。为了简单起见,您可以使用项目主页上的 "Download ZIP" 按钮。
运行 Visual Studio 并按照 these directions 打开解决方案 (.sln) 文件之一:
- 在“文件”菜单上,单击“打开解决方案”。 “打开解决方案”对话框打开。
- 导航到您想要的解决方案。
- 单击解决方案文件夹,这将显示并选择文件夹中的解决方案文件。如果看不到任何解决方案文件,请验证文件类型列表框中的值是否为解决方案文件。
- 单击“打开”。
使用 these instructions 构建。此时你要么有一个 .exe 要么有一个 .dll(取决于你正在构建的项目)。