Skip to content

pip install from package from github, with github dependencies  #3610

@dneise

Description

@dneise
  • Pip version: 8.1.1
  • Python version: python 3.5 (Anaconda)
  • Operating System: Ubuntu 15.10

Description:

The story goes like this: We wrote a little app shifthelper, which calls us on the phone, in case our experiment (a telescope on a remote island) has a problem. Then we found that part of the app, should be pulled out as a library smart_fact_crawler, since other apps for the same experiment might be able to use it.

Neither the little app nor the little library are on pypi, since we strongly believe only about 20 people in the world can use it, which we all know. At the same time the repos are of course public github repos.

We would like to enable our non-developer friends to be able to install the app (including all dependencies) without prior explicit cloning it. Basically we want the installation to be a one-liner.

What already works:

One can pip install the dependency first and then install the app, like this:

pip install git+https://github.com/fact-project/smart_fact_crawler pip install git+https://github.com/fact-project/shifthelper 

Or one can clone the repo of the app only, pip install the requirements.txt and then pip install the app like so:

git clone https://github.com/fact-project/shifthelper pip install -r shifthelper/requirements.txt pip install ./shifthelper 

What I've run:

I searched the web and found the "dependency_links" keyword argument for setuptools.setup(). Although I also found comments here and there, telling that this feature is to be considered depricated and might vanish soon.

So I've put this into the setup.py of the app

 # ... install_requires=[ # ... 'smart_fact_crawler', ], dependency_links=[ 'git+https://github.com/fact-project/smart_fact_crawler.git#egg=smart_fact_crawler' ], # ...

And tried to install the app like this:

pip install git+https://github.com/fact-project/shifthelper 

but pip complained like this in friendly red letters ;-)

Collecting smart-fact-crawler (from shifthelper==0.6.0) Could not find a version that satisfies the requirement smart-fact-crawler (from shifthelper==0.6.0) (from versions: ) No matching distribution found for smart-fact-crawler (from shifthelper==0.6.0) 

My question now is:

Is maybe my entire approach wrong as in: What you are trying is not usually the way people work. You should instead try: ...


Related SO questions are:

Metadata

Metadata

Assignees

No one assigned

    Labels

    auto-lockedOutdated issues that have been locked by automationtype: supportUser Support

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions