18

I am trying to install mongodb_engine with my python django application, however I am getting this error

Cannot find command 'git'

I am trying this command from mongodb documentation. http://django-mongodb-engine.readthedocs.org/en/latest/topics/setup.html

pip install git+https://github.com/django-nonrel/django@nonrel-1.5

I believe git here is causing the problem since the project is stored in git repo. Is there a way to install git to run this pip command? I tried multiple sources but wasn't able to get it to work.

Tim Stack
  • 3,080
  • 2
  • 14
  • 32
ETS
  • 366
  • 2
  • 5
  • 15
  • I am facing the same problem. Were you able to resolve it? Did you install 'git' ? Where did you install it from? Can you please tell me the whole thing you did. Thanks a lot. – user3664020 May 09 '15 at 05:53

4 Answers4

25

If your using Anacoda, then you can try this

conda install git
Naveen Nair
  • 419
  • 4
  • 7
18

Download and Install git in your windows from here:

https://git-scm.com/download/win

Then add its installation bin path to your windows's environment path. Then you will find the git command at the command prompt globally.

This may solve you problem.

How to change environment variables : Git: Installing Git in PATH with GitHub client for Windows

For Visual studio code restart after adding the environment variables

Imran
  • 4,011
  • 1
  • 15
  • 32
  • Where to install the git from? I see a lot of git program online. I am not sure which one to install. Can you please tell me? – user3664020 May 09 '15 at 05:51
2

Add the path of git.exe to your windows environment variable called 'path'. My git.exe is in the path of 'C:\Users\LW\AppData\Local\GitHub\PortableGit_c2ba306e536fdf878271f7fe636a147ff37326ad\bin\git.exe'. Your can find your exe file in the similar folder path.

0

You can install git and configure the path with the git directory in System variables path.

  • 1
    is it different to the highest rated accepted answer to this question? – Akber Iqbal Jan 10 '20 at 01:41
  • It's more like a comment then an answer. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead); instead, provide answers according to [guide](https://stackoverflow.com/help/how-to-answer) – Anna Jan 10 '20 at 02:16