linkyndy
linkyndy

Reputation: 17900

Pip doesn't install latest GitHub release

I have two releases tagged on GitHub: 0.1 and 0.2. When I manually download https://github.com/username/repo/tarball/master, version 0.2 gets downloaded. However, if I do pip install https://github.com/username/repo/tarball/master in my command line, version 0.1 get installed. Why is this happening? How can I install my repo's latest release via Pip?

Upvotes: 2

Views: 1951

Answers (2)

linkyndy
linkyndy

Reputation: 17900

Seems the issue was something much, much silly. I forgot to update the package's version in setup.py to 0.2, so it was installing 0.1, even though the code was the one updated for 0.2.

The conclusion is: don't forget to check&update your package's version in setup.py!

If this isn't the case, then try @JavaCake's solution.

Upvotes: 1

JavaCake
JavaCake

Reputation: 4115

When this happens i usually do following:

  1. Create a text file with a requirement for pip specifying the git repo and the commit hashtag.
  2. Use pip install with requirement option.

Eg:

requirement.txt:

git+git://github.com/nathanborror/django-basic-apps.git@5d7705bc32b3eab042790dc26ffa1a1c81844438

from bash:

pip install -r requirement.txt

Upvotes: 1

Related Questions