Conda:直接从 github 安装/升级 [英] Conda: Installing / upgrading directly from github

查看:32
本文介绍了Conda:直接从 github 安装/升级的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以使用 conda 从 GitHub 安装/升级软件包吗?

Can I install/upgrade packages from GitHub using conda?

例如,使用 pip 我可以做到:

For example, with pip I can do:

pip install git+git://github.com/scrappy/scrappy@master

直接从 GitHub 的 master 分支安装 scrappy.我可以用 conda 做一些等效的事情吗?

to install scrappy directly from the master branch in GitHub. Can I do something equivalent with conda?

如果这是不可能的,那么使用 conda 安装 pip 并使用 pip 管理此类本地安装是否有意义?

If this is not possible, would it make any sense to install pip with conda and manage such local installations with pip?

推荐答案

现在通过 conda-env 提供了更好的支持.例如,您现在可以:

There's better support for this now through conda-env. You can, for example, now do:

name: sample_env
channels:
dependencies:
   - requests
   - bokeh>=0.10.0
   - pip:
     - "--editable=git+https://github.com/pythonforfacebook/facebook-sdk.git@8c0d34291aaafec00e02eaa71cc2a242790a0fcc#egg=facebook_sdk-master"

它仍然在幕后调用 pip,但您现在可以在单个 environment.yml 文件中统一您的 conda 和 pip 包规范.

It's still calling pip under the covers, but you can now unify your conda and pip package specifications in a single environment.yml file.

如果你想用这个文件更新你的根环境,你需要把它保存到一个文件中(例如,environment.yml),然后运行命令:conda env更新 -f environment.yml.

If you wanted to update your root environment with this file, you would need to save this to a file (for example, environment.yml), then run the command: conda env update -f environment.yml.

您更有可能想要创建一个新环境:

It's more likely that you would want to create a new environment:

conda env create -f environment.yml(按照评论中的假设进行了更改)

conda env create -f environment.yml (changed as supposed in the comments)

这篇关于Conda:直接从 github 安装/升级的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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