Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Python Pip install software, to pull packages from Github?

Tags:

python

pip

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 

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.

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

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)?

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 

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

like image 565
John C Avatar asked Sep 06 '11 15:09

John C


People also ask

Can you pip install from GitHub?

You can deploy Git locally, or use it via a hosted service, such as Github, Gitlab or Bitbucket. One of the advantages of using pip together with Git is to install the latest commits of unreleased Python packages as branches from Github.


1 Answers

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 

or

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

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

sudo apt-get install git-core 
like image 85
Mridang Agarwalla Avatar answered Oct 11 '22 15:10

Mridang Agarwalla