mingw 设置python 设置git环境变量

1.python路径设置:

安装python 比如目录:C:Python27

假如mingw安装C盘根目录下的话,进入下面目录:C:MinGWmsys1.0etc

找到 fstab 文件修改如下:

C:/MinGW     /mingw

C:/Python27             /python

然后配置profile文件:

if [ $MSYSTEM == MINGW32 ]; then
export PATH=".:/usr/local/bin:/mingw/bin:/bin:/python:$PATH"
else
export PATH=".:/usr/local/bin:/bin:/mingw/bin:/python:$PATH"
fi

-----------------------------------

2.git路径设置:

git下载地址:https://git-scm.com/download/win 

假如git安装目录:C:Program FilesGit

则设置profile文件(添加如下两句):

export PATH="/c/Program Files/Git/bin:${PATH}"
export PATH="/c/Program Files/Git/mingw64/libexec/git-core:${PATH}"

--------

备注:其中git 设置的第一条是必须的,第二条也可以设置上。

=====================================================

参考:

https://blog.csdn.net/zxng_work/article/details/78515486

https://blog.csdn.net/chinabinlang/article/details/39005455

https://stackoverflow.com/questions/5885393/using-msysgit-from-mingw-and-vice-versa

原文地址:https://www.cnblogs.com/wainiwann/p/9530976.html