Python 如何知道pip本身的版本
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26378344/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to know the version of pip itself
提问by doniyor
Which shell command gives me the actual version of pipI am using?
哪个 shell 命令为我提供了pip我正在使用的实际版本?
pipgives with pip showall version of modules that are installed but excludes itself.
pip提供pip show已安装但排除自身的所有模块版本。
采纳答案by Bowersbros
You can do this:
你可以这样做:
pip -V
or:
或者:
pip --version
回答by boh717
Just for completeness:
只是为了完整性:
pip -V
pip -V
pip --version
pip --version
pip listand inside the list you'll find also pip with its version.
pip list在列表中,您还可以找到 pip 及其版本。
回答by Don_Manj
On RHEL "pip -V" works :
在 RHEL "pip -V" 上工作:
$ pip -V
pip 6.1.1 from /usr/lib/python2.6/site-packages (python 2.6)
回答by gxpr
For windows:
对于窗户:
import pip
help(pip)
shows the version at the end of the help file.
在帮助文件的末尾显示版本。
回答by Manideep
First, open a command prompt After type a bellow commands.
首先,打开命令提示符后键入以下命令。
check a version itself Easily :
轻松检查版本本身:
Form Windows:
窗体窗口:
pip installation :
点安装:
pip install pip
pip Version check:
pip 版本检查:
pip --version
回答by Adarsh97
check two things
检查两件事
pip2 --version
and
和
pip3 --version
because the default pip may be anyone of this so it is always better to check both.
因为默认 pip 可能是其中的任何一个,所以最好同时检查两者。
回答by ellie
Many people use both 2.X and 3.X python. You can use pip -Vto show default pip version.
If you have many python versions, and you want to install some packages through different pip, I advise this way:
许多人同时使用 2.X 和 3.X python。您可以使用pip -V来显示默认的 pip 版本。
如果你有很多python版本,并且你想通过不同的pip安装一些包,我建议这样:
sudo python2.X -m pip install some-package==0.16
回答by absawd_4om
For windows just type:
对于 Windows,只需键入:
python -m pip --version
回答by Avijit Das
For Windows machine go to command prompt and type.
对于 Windows 机器,转到命令提示符并键入。
pip -V
回答by Abinet KenoreGetachew
Any of the following should work
以下任何一项都应该有效
pip --version
# pip 19.0.3 from /usr/local/lib/python2.7/site-packages/pip (python 2.7)
or
或者
pip -V
# pip 19.0.3 from /usr/local/lib/python2.7/site-packages/pip (python 2.7)
or
或者
pip3 -V
# pip 19.0.3 from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip (python 3.7)

