[英]Pip doesn't install latest GitHub release
I have two releases tagged on GitHub: 0.1 and 0.2. 我在GitHub上标记了两个版本:0.1和0.2。 When I manually download
https://github.com/username/repo/tarball/master
, version 0.2 gets downloaded. 当我手动下载
https://github.com/username/repo/tarball/master
,将下载0.2版。 However, if I do pip install https://github.com/username/repo/tarball/master
in my command line, version 0.1 get installed. 但是,如果我在命令行
pip install https://github.com/username/repo/tarball/master
,则会pip install https://github.com/username/repo/tarball/master
0.1版。 Why is this happening? 为什么会这样呢? How can I install my repo's latest release via Pip?
如何通过Pip安装我的仓库的最新版本?
When this happens i usually do following: 发生这种情况时,我通常会执行以下操作:
pip install
with requirement option . pip install
和pip install
选项 。 Eg: 例如:
requirement.txt: requirement.txt:
git+git://github.com/nathanborror/django-basic-apps.git@5d7705bc32b3eab042790dc26ffa1a1c81844438
from bash: 从bash:
pip install -r requirement.txt
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. 我忘了将
setup.py
的软件包版本更新为0.2,因此它正在安装0.1,即使代码是针对0.2更新的。
The conclusion is: don't forget to check&update your package's version in setup.py
! 结论是:别忘了在
setup.py
检查并更新软件包的版本!
If this isn't the case, then try @JavaCake's solution. 如果不是这种情况,请尝试@JavaCake的解决方案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.