使用 pip install -e 指定 extras_require [英] Specify extras_require with pip install -e

查看:57
本文介绍了使用 pip install -e 指定 extras_require的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当从 git 存储库安装时,如何使用 pip 安装 extras_requires ?

How can one manage to install extras_requires with pip when installing from a git repository ?

我知道当项目在 pypi 上时,您可以执行 pip install project[extra].
而且你必须为 git repo 执行 pip install -e git+https://github.com/user/project.git#egg=project 但我没有找到如何链接这两个选项一起.

I know that you can do pip install project[extra] when the project is on pypi.
And you have to do pip install -e git+https://github.com/user/project.git#egg=project for a git repo but I didn't manage to find how to link these two options together.

推荐答案

这应该可行,每个例子#6

对于远程仓库:

pip install -e git+https://github.com/user/project.git#egg=project[extra]

这对于本地人来说(感谢@Kurt-Bourbaki):

And this for local ones (thanks to @Kurt-Bourbaki):

pip install -e .[extra]

这篇关于使用 pip install -e 指定 extras_require的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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