如何使用Python Pip安装软件从Github中提取软件包? [英] How to use Python Pip install software, to pull packages from Github?

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

问题描述

我正在尝试使用以下语法,使用Pip从Github安装软件包

I'm trying to install a package from Github, using Pip, using the following syntax

pip install -e git+https://github.com/facebook/python-sdk.git#egg=FacebookSDK

,并显示错误找不到命令git". 此问题具有(未选中)答案,表明需要在系统上安装Git.但是,此答案指出Pip支持Git,Subversion,Bazaar和Mercurial.

and getting the error "cannot find command git". This Question has (unchecked) answers saying that Git needs to be installed on the system. However, this Answer states that "Git, Subversion, Bazaar and Mercurial are all supported" by Pip.

Pip文档也说它对其他版本控制系统(Git ,Mercurial和Bazaar)".

The Pip documentation also says it has "Native support for other version control systems (Git, Mercurial and Bazaar)".

那么我该如何使用Pip安装此软件包?我真的不想要在我的VPS上安装Git.还是有任何非Pip工具,仅用于从存储库中提取文件(无需进行完整的Git安装)?

So how do I install this package with Pip? I really don't want to install Git on my VPS. Or are there any non-Pip tools, for just pulling files from repositories (without doing a full Git install)?

更新-所以我咬紧牙关,然后在我的VPS上安装了Git. Pip仍然无法获取该程序包,但是它给出了一组不同的错误,所以-进展. :)我终于做到了

Update - so I bit the bullet, and installed Git on my VPS. Pip still wasn't able to grab the package, but it was giving a different set of errors, so - progress. :) I finally did

git clone http://github.com/facebook/python-sdk.git

(注意http,而不是https),并设法下载软件包,然后手动进行安装.

(note the http, not https), and manage to download the package, then just installed it manually.

推荐答案

如果我没有记错的话,则需要在计算机上安装git客户端.如果您没有安装git,请尝试以下操作:

If I'm not mistaken, you would need the git client to be install on your machine. In the event that you don't have git installed, try this:

pip install https://github.com/facebook/python-sdk/zipball/master

pip install https://github.com/facebook/python-sdk/tarball/master


您需要安装git-core,因为git://协议没有任何关联.


You need to install the git-core, since the git:// protocol isn't associated with anything.

sudo apt-get install git-core

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

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