Cannot find command 'git' - windows

江枫思渺然 提交于 2019-12-03 19:31:12

问题


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.


回答1:


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.




回答2:


If your using Anacoda, then you can try this

conda install git



回答3:


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.



来源:https://stackoverflow.com/questions/29565779/cannot-find-command-git-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!