How to know the version of pip itself

2019-03-08 12:47发布

Which shell command gives me the actual version of pip I am using?

pip gives with pip show all version of modules that are installed but excludes itself.

标签: python pip
8条回答
我欲成王,谁敢阻挡
2楼-- · 2019-03-08 13:04

On RHEL "pip -V" works :

$ pip -V
pip 6.1.1 from /usr/lib/python2.6/site-packages (python 2.6)
查看更多
爷的心禁止访问
3楼-- · 2019-03-08 13:05

For windows:

import pip

help(pip) 

shows the version at the end of the help file.

查看更多
Fickle 薄情
4楼-- · 2019-03-08 13:10

You can do this:

pip -V

or:

pip --version
查看更多
太酷不给撩
5楼-- · 2019-03-08 13:14

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 --version 
查看更多
仙女界的扛把子
6楼-- · 2019-03-08 13:14

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.

查看更多
Root(大扎)
7楼-- · 2019-03-08 13:16

Many people use both 2.X and 3.X python. You can use pip -V to show default pip version.
If you have many python versions, and you want to install some packages through different pip, I advise this way:

sudo python2.X -m pip install some-package==0.16
查看更多
登录 后发表回答