git filter repo-未找到Python-但已安装 [英] git filter repo - Python was not found - but it's installed
问题描述
所以我试图第一次使用git filter-repo.我已经安装了Python 3.9.我尝试运行: git filter-repo --strip-blobs-big-than 100M
So I'm trying to use git filter-repo for the first time.
I've installed Python 3.9.
I try to run:
git filter-repo --strip-blobs-bigger-than 100M
每次失败:
- Git Bash:
git:'filter-repo'不是git命令.
- Powershell:
未找到Python;
- CMD:
未找到Python;
对我所缺少的东西有什么建议吗?
Any advice on what I'm missing please?
推荐答案
仔细检查您必须确保(在常规CMD中)首先在%PATH%
中使用 git-filter-repo
.
例如,如果通过 pip
安装它,则应该这样做,因为 Python文件夹应添加到PATH中在安装Python3时.
You must make sure first (in a regular CMD) than git-filter-repo
is in your %PATH%
.
If you install it through pip
, for instance, it should, since the Python folder should be added to your PATH at Python3 installation.
一旦%PATH%
是正确的(并且您会在其中看到 git-filter-repo
),则 git
将识别 filter-repo
命令.
Once that %PATH%
is correct (and you see git-filter-repo
in it), then git
will recognize the filter-repo
command.
评论,现在有一个 git-filter-repo
Homebrew公式 ,可在Mac上简化安装过程.
As commented, there is now a git-filter-repo
Homebrew formula, which offers an easier installation process on a Mac.
这篇关于git filter repo-未找到Python-但已安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!