How to use Python Pip install software, to pull pa

2019-01-21 22:38发布

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.

标签: python pip
3条回答
贼婆χ
2楼-- · 2019-01-21 23:01

for windows users:

1) I first download and unpack the file.

2) Then in the python directory going to \Scripts

3) Starting here the command prompt

4) pip install C:\Theano-master # theano-master is example library

查看更多
beautiful°
3楼-- · 2019-01-21 23:11

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
查看更多
beautiful°
4楼-- · 2019-01-21 23:13

I'm learning about PostgreSQL and had to install the windows version. It was suggested to use git+, and I was running to the same issues that John C was experiencing.

Martijn above recommended unpacking and downloading. That is also what the creators of win-psycopg suggested. So I thought I'd share their method for installing into a Virtual Environment.

Thank you stickpeople: http://www.stickpeople.com/projects/python/win-psycopg/

To install into a virtual env: Pretty neat

查看更多
登录 后发表回答