Conda: install / upgrade directly from github

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 

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

If this is not possible, would it be wise to install pip using conda and manage such local installations using pip?

+80
python github pip package-managers conda
Sep 27 '13 at 3:50
source share
4 answers

There is better support for this right 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 still calls pip, but now you can combine the conda and pip package specifications into a single environment.yml file.

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

Most likely, you will want to create a new environment:

conda env create -f environment.yml (modified as suggested in the comments)

+58
Sep 26 '15 at 17:29
source share

Answers are out of date. You just have to install pip and git. Then you can use pip as usual:

  1. Activate your source activate myenv environment source activate myenv

  2. conda install git pip

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

+55
May 02 '18 at 19:10
source share

conda does not support this directly because it is installed from binary files, while git install will be from the source. conda build supports recipes created from git. On the other hand, if all you want to do is to keep abreast of the latest and greatest packages, using pip inside Anaconda is just fine or alternately use setup.py develop to clone git.

+28
Sep 28 '13 at 20:13
source share

I found a link to this in condas issues . The following should now work.

 name: sample_env channels: dependencies: - requests - bokeh>=0.10.0 - pip: - git+https://github.com/pythonforfacebook/facebook-sdk.git 
0
May 24 '19 at 14:46
source share



All Articles