问题描述
我将 python site-packages 目录中的 pip
安装文件夹添加到我的 PATH,但我仍然只能在我的 git bash 中通过 python -m pip
运行它.只是 pip
给了我 command not found
.
I added the pip
installation folder in my python site-packages directory to my PATH, but I can still only run it via python -m pip
in my git bash. Just pip
gives me command not found
.
我环顾了 pip
目录,但没有看到任何二进制文件,所以这是有道理的.然而很明显 pip
是一个通常在没有 python -m
的命令行上使用的东西.那么我在这里缺少什么组件?
I looked around the pip
directory and I don't see any binaries, so this makes sense. Yet clearly pip
is a thing that is normally used on the command line without python -m
. So what component am I missing here?
推荐答案
尝试将 C:/path/to/python/Scripts/
添加到 PATH
Try adding C:/path/to/python/Scripts/
to PATH
那里应该有一个 pip.exe!
There should be a pip.exe there!
这篇关于如何使 pip 可用于 Windows 上的 git bash 命令行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!