用pip使用--process-dependency-links的替代方法是什么? [英] What is the alternative to using --process-dependency-links with pip
问题描述
pip install
一个对另一个repo(也在内部github上)有依赖关系的回购(在内部github上)。我尝试了几个选择,但是工作的是这样的: (env)abc $ cat requirements.txt
-e git://github.abc.com/abc/abc.git#egg=my_abc --process-dependency-links
(env)abc $ pip install -r requirements.txt
但是我在运行命令行时遇到了一个警告:
DEPRECATION:依赖链接处理已被弃用,并将在未来版本中删除。
我在点子V7.1.2。什么是正确的方法来做到这一点?
尝试使用 - process-dependency-links
标志选项。您可能还必须使用 - allow-external packagename
或 - allow-unverified packagename
,其中packagename实际指定要安装的不在官方存储库中的任何依赖关系
注意:由于它的功能已被弃用,因此 - -process-dependency-links
标志将尽快完全移除。
我相信首选方法是提供 requirements.txt
文件。
例如:让我对我的项目有一定的要求,所以我会写在requirements.txt中。
& cat requirements.txt
django-compressor> = 1.4,< 1.5
django-grappelli> = 2.6.3,< 2.7
django-bootstrap-form> = 3.1,< 3.2
接下来,我可以使用以下方式安装它:
$ pip install -r requirements.txt
这就是你必须要做的事情
I am using Python 2.7. I am trying to pip install
a repo (on internal github) that has a dependency on another repo (also on internal github). I tried several options but the one that worked was like this:
(env)abc$ cat requirements.txt
-e git://github.abc.com/abc/abc.git#egg=my_abc --process-dependency-links
(env)abc$ pip install -r requirements.txt
But I got a warning while running the command line that said:
"DEPRECATION: Dependency Links processing has been deprecated and will be removed in a future release."
I am on pip v7.1.2. What is the right way to do this?
Try using --process-dependency-links
flag option. You might also have to use --allow-external packagename
or --allow-unverified packagename
, where packagename actually specifies whichever dependency
you want to install that's not in an official repository
Note:Since it's deprecated functionality, the --process-dependency-links
flag will be completely removed soon.
I believe the preferred approach is to supply a requirements.txt
file instead.
For Example : Let i have certain requirements for my project, so i will write that in requirements.txt.
&cat requirements.txt
django-compressor>=1.4,<1.5
django-grappelli>=2.6.3,<2.7
django-bootstrap-form>=3.1,<3.2
Next i can install it using :
$ pip install -r requirements.txt
That's all you have to do
这篇关于用pip使用--process-dependency-links的替代方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!