Conda: Installing / upgrading directly from github

前端 未结 4 1810
心在旅途
心在旅途 2020-11-28 18:30

Can I install/upgrade packages from GitHub using conda?

For example, with pip I can do:

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


        
4条回答
  •  情话喂你
    2020-11-28 18:58

    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 env create -f environment.yml (changed as supposed in the comments)

提交回复
热议问题