mingw 設置python 設置git環境變量


1.python路徑設置:

安裝python 比如目錄:C:\Python27

假如mingw安裝C盤根目錄下的話,進入下面目錄:C:\MinGW\msys\1.0\etc

找到 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 Files\Git

則設置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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM