找不到命令“git"-windows [英] Cannot find command 'git' - windows

查看:70
本文介绍了找不到命令“git"-windows的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用我的 python django 应用程序安装 mongodb_engine,但是我收到此错误

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

Cannot find command 'git'

我正在 mongodb 文档中尝试这个命令.http://django-mongodb-engine.readthedocs.org/en/latest/topics/setup.html

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

我相信这里的 git 是导致问题的原因,因为该项目存储在 git repo 中.有没有办法安装 git 来运行这个 pip 命令?我尝试了多个来源,但无法使其正常工作.

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.

推荐答案

从这里下载并安装 git:

Download and Install git in your windows from here:

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

然后将其安装 bin 路径添加到您的 windows 环境路径中.然后你会全局找到命令提示符下的git命令.

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.

如何更改环境变量:Git:安装使用适用于 Windows 的 GitHub 客户端的 PATH 中的 Git

添加环境变量后重新启动Visual Studio代码

For Visual studio code restart after adding the environment variables

这篇关于找不到命令“git"-windows的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆