如何从GitHub安装Python包? [英] How to install Python package from GitHub?

查看:1992
本文介绍了如何从GitHub安装Python包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用httpie的新功能.此功能位于github repo https://github.com/jkbr/httpie 中,但未在发行版中在python包索引中 https://pypi.python.org/pypi/httpie

I want to use a new feature of httpie. This feature is in the github repo https://github.com/jkbr/httpie but not in the release on the python package index https://pypi.python.org/pypi/httpie

如何从github存储库安装httpie软件包?我尝试过

How can I install the httpie package from the github repo? I tried

pip install https://github.com/jkbr/httpie

但是我收到一个错误消息无法打开包装"

But I got an error 'could not unpack'

在Nodejs中,我可以像这样从github安装软件包

In Nodejs, I can install packages from github like this

npm install git+https://github.com/substack/node-optimist.git

推荐答案

您需要使用正确的git URL:

You need to use the proper git URL:

pip install git+https://github.com/jkbr/httpie.git#egg=httpie

另请参见 VCS支持部分的pip文档.

Also see the VCS Support section of the pip documentation.

不要忘记将egg=<projectname>部分包含在

Don’t forget to include the egg=<projectname> part to explicitly name the project; this way pip can track metadata for it without having to have run the setup.py script.

这篇关于如何从GitHub安装Python包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆