Joel
Joel

Reputation: 23887

Using pip when a package dependency isn't installable through pip?

So I've written a small python package. I'd like to set it up to be installed with pip. But it depends on another package (odeintw to be precise), which as far as I can tell cannot be installed with pip.

My options seem to be

  1. Include odeintw within the package I'm sending out. I would much rather not do that if it can be avoided since I don't want to get into the question of what implications this would have on the license I use and making sure that appropriate credit is given.
  2. Set it up to install through pip, but leaving out the requirement for odeintw and simply stating in the readme information that the user also needs to get odeintw. This isn't ideal either since it's much nicer for the user if things just work.

Is there an alternative way to get odeintw installed by pip?

Upvotes: 1

Views: 122

Answers (2)

Ganesh Kathiresan
Ganesh Kathiresan

Reputation: 2088

As per this document:

You can add non-pip installable packages as:

setup(
    ...
    dependency_links=['http://github.com/user/repo/tarball/master#egg=package-1.0']
    ...
)

Upvotes: 1

Jebby
Jebby

Reputation: 1955

I was able to install the package you linked to with pip by using:

sudo pip install git+https://github.com/WarrenWeckesser/odeintw

Alternatively you can make a file requirements.txt in your package directory with the contents:

git+https://github.com/WarrenWeckesser/odeintw

and then cd to the directory and sudo pip install -r requirements.txt

Upvotes: 1

Related Questions