GitPython FileNotFoundError:[WinError 2]

时间:2016-02-09 16:46:19

标签: python gitpython

我正在尝试将for(i in df[nrow(df)]){ for(j in df[ncol(df)]){ if (j==i+1){ df[i,j]==1 }}} GitPython一起使用,我的代码如下:

diff

路径包含from git import Repo repo = Repo(r'D:\Projects\SCRIPTS\TestRepo') t = repo.head.commit.tree repo.git.diff(t) 文件。

但我收到的错误如下:

.git

FileNotFoundError: [WinError 2] The system cannot find the file specified

我通过命令行在这样的环境变量中设置了 raise GitCommandNotFound(str(err)) FileNotFoundError: [WinError 2] The system cannot find the file specified git.exe 并验证它可以使用;

set GIT_PYTHON_GIT_EXECUTABLE="C:\Program Files (x86)\Git\bin\git.exe"

最后,我会使用> git --version git version 1.9.5.msysgit.1列出过去7天的差异列表(GitPython

有人可以帮我找出我错过的东西吗?

谢谢。

0 个答案:

没有答案
相关问题