Cannot find command 'git' - windows

2019-03-29 02:11发布

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.

3条回答
不美不萌又怎样
2楼-- · 2019-03-29 02:37

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.

查看更多
We Are One
3楼-- · 2019-03-29 02:40

If your using Anacoda, then you can try this

conda install git
查看更多
神经病院院长
4楼-- · 2019-03-29 02:47

Install git at first in windows. 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.

查看更多
登录 后发表回答