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

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

问题描述

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



例如,使用 pip 我可以这样做:

 点子安装git + git://github.com/scrappy/scrappy@master 

安装 scrappy 直接从GitHub的 master 分支。我可以做一些与conda相同的东西吗?如果这是不可能的,用conda安装pip并用pip管理这些本地安装是否有意义?

解决方案

现在通过 conda-env 对此有更好的支持。例如,您现在可以这样做:

  name:sample_env 
channels:
dependencies:
- 请求
- 散景> = 0.10.0
- 点:$ b​​ $ b - --editable = git + https://github.com/pythonforfacebook/facebook-sdk.git@ 8c0d34291aaafec00e02eaa71cc2a242790a0fcc#egg = facebook_sdk-master

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



如果您想更新根环境使用此文件,您需要将其保存到文件中(例如, environment.yml ),然后运行命令: conda env update - f environment.yml



您很可能想创建一个新环境:



conda create -f environment.yml


Can I install/upgrade packages from GitHub using conda?

For example, with pip I can do:

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

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

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

解决方案

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"

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.

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 create -f environment.yml

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

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