Python 如何使用pip从Bitbucket安装软件包?

Python 如何使用pip从Bitbucket安装软件包?,python,pip,bitbucket,Python,Pip,Bitbucket,我正在制作一个setup.py,它需要指向我的存储库 使用github,我可以做到这一点: dependency_links=['https://github.com/nathanborror/django-registration/tarball/master#egg=django-registration'] 如何对bitbucket项目执行相同的操作 例如,此url: https://bitbucket.org/abraneo/django-registration 谢谢。您的Gith

我正在制作一个setup.py,它需要指向我的存储库

使用github,我可以做到这一点:

dependency_links=['https://github.com/nathanborror/django-registration/tarball/master#egg=django-registration']
如何对bitbucket项目执行相同的操作

例如,此url:

https://bitbucket.org/abraneo/django-registration

谢谢。

您的Github链接似乎指向Gzip tar文件。尝试对Bitbucket托管的项目执行相同的操作--

可以在
依赖项链接中使用以下URL添加Bitbucket Mercurial(hg)存储库:

'https://bitbucket.org/zzzeek/alembic/get/tip.zip#egg=alembic-0.6.0'
在本例中,它安装了Alembic包的开发版本(0.6),在编写本文时,它还没有在PyPI中


请注意,BitBucket同时支持Mercurial和git。如果repo是Mercurial,URL必须引用
tip.zip
,但如果是git,URL必须引用
master.zip

,才能从pip运行
pip安装安装该bitbucket项目https://bitbucket.org/abraneo/django-registration/get/tip.tar.gz
在提问时,BitBucket不支持Git+1保持它的最新状态。所以现在其他人不会像我一样感到困惑:如果你得到了404(你应该得到),试试
https://bitbucket.org/zzzeek/alembic/get/master.zip#egg=alembic-0.6.0'
。现在我实际上需要
pip安装'https://bitbucket.org/zzzeek/alembic/get/master.zip#egg=alembic-0.6.0'