简体   繁体   English

我可以使用pip从git及其依赖项中安装项目吗?

[英]Can I use pip to install project from git with its dependency?

So I have a package that have a set of dependencies which I list in requirements.txt. 因此,我有一个软件包,该软件包具有一组依赖关系,这些依赖关系已在Requirements.txt中列出。 Some of this dependencies (our projects in git) have dependencies also listed in requirements.txt also. 其中一些依赖项(我们在git中的项目)的依赖项也列在requirements.txt中。

Will pip install dependencies recursively somehow? pip是否会以某种方式递归安装依赖项?

As long as the package specifies what its requirements are in the setup.py file (see the setuptools documentation for details) then yes, it should install the dependencies recursively. 只要软件包在setup.py文件中指定了它的要求(有关详细信息,请参阅setuptools文档 ),那么可以,它应该以递归方式安装依赖项。

See Requirements Specifiers in the pip documentation. 请参阅pip文档中的需求说明。

pip supports installing from “requirement specifiers” as implemented in pkg_resources Requirements pip支持从pkg_resources要求中实现的“需求说明符”进行安装

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM