开发者

Command that works in local computer, but doesn't work in server?

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!


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


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.


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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜