3

I am using ubuntu 10.04 for my desktop and Ubunt 10.04 server edition ofr my server.

the following commnad:

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

Works on my deskotp, but doesnt work on the server.

On the server, I received the following error message:

Obtaining facebook from git+http://github.com/facebook/python-sdk.git#egg=facebook
  Cloning http://github.com/facebook/python-sdk.git to ./src/facebook
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/pip/basecommand.py", line 115, in main
    self.run(options, args)
  File "/usr/local/lib/python2.6/dist-packages/pip/commands/install.py", line 155, in run
    requirement_set.install_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/local/lib/python2.6/dist-packages/pip/req.py", line 805, in install_files
    req_to_install.update_editable(not self.is_download)
  File "/usr/local/lib/python2.6/dist-packages/pip/req.py", line 356, in update_editable
    vcs_backend.obtain(self.source_dir)
  File "/usr/local/lib/python2.6/dist-packages/pip/vcs/git.py", line 104, in obtain
    [self.cmd, 'clone', '-q', url, dest])
  File "/usr/local/lib/python2.6/dist-packages/pip/vcs/__init__.py", line 100, in cmd
    raise BadCommand('Cannot find command %s' % self.name)
BadCommand: Cannot find command git

Storing complete log in ./pip-log.txt

May I know what am I missing? I have already installed pip, easy_install. What lese have I missed?

How to I get the command working?

Thank you!

Chris Johnson
  • 20,650
  • 6
  • 81
  • 80
DjangoRocks
  • 13,598
  • 7
  • 37
  • 52

3 Answers3

6

It looks like you are missing git, the tool that is used to clone the repository:

BadCommand: Cannot find command git

Try installing git on your server:

sudo apt-get install git-core
Jan Rüegg
  • 9,587
  • 8
  • 63
  • 105
  • For me, git was already installed under both su and my user accounts, but linux under su (sudo) was ignoring the /usr/local/bin dir for security. [Solution](http://stackoverflow.com/a/22078136/623735) was a symlink: `sudo ln -s $(which git) /bin/git`. – hobs Feb 27 '14 at 19:15
0

On Fedora, git and git-core packages were installed in /usr/local/bin, but my su wasn't looking there--security feature of our Linux distros, perhaps? A symlink from /bin, /usr/bin, to /usr/local/bin/git should do the trick. This worked for me:

sudo ln -s `which git` /bin/git
hobs
  • 18,473
  • 10
  • 83
  • 106
0

I had the same issue. Even though the git package was installed the first answer was correct. sudo apt-get install git-core solved the problem.

zobbo
  • 236
  • 1
  • 3