问题:如何知道点子本身的版本

哪个shell命令可以提供我pip正在使用的实际版本?

pip提供pip show已安装但不包含的所有模块版本。

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.


回答 0

你可以这样做:

pip -V

要么:

pip --version

You can do this:

pip -V

or:

pip --version

回答 1

仅出于完整性考虑:

pip -V

pip --version

pip list 在列表中,您还会发现其版本。

Just for completeness:

pip -V

pip --version

pip list and inside the list you’ll find also pip with its version.


回答 2

对于Windows:

import pip

help(pip) 

在帮助文件末尾显示版本。

For windows:

import pip

help(pip) 

shows the version at the end of the help file.


回答 3

对于Windows,只需键入:

python -m pip --version

For windows just type:

python -m pip --version

回答 4

在RHEL上,“ pip -V”有效:

$ pip -V
pip 6.1.1 from /usr/lib/python2.6/site-packages (python 2.6)

On RHEL “pip -V” works :

$ pip -V
pip 6.1.1 from /usr/lib/python2.6/site-packages (python 2.6)

回答 5

以下任何一项都可以工作

pip --version
# pip 19.0.3 from /usr/local/lib/python2.7/site-packages/pip (python 2.7)

要么

pip -V       
# pip 19.0.3 from /usr/local/lib/python2.7/site-packages/pip (python 2.7)

要么

pip3 -V      
# pip 19.0.3 from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip (python 3.7)

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)

回答 6

许多人同时使用2.X和3.X python。您可以pip -V用来显示默认的点子版本。
如果您有许多python版本,并且想通过不同的pip安装一些软件包,我建议您这样做:

sudo python2.X -m pip install some-package==0.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

回答 7

启动Python并输入import pip pip.__version__适用于所有python软件包的类型。

Start Python and type import pip pip.__version__ which works for all python packages.


回答 8

对于Windows计算机,请转到命令提示符并键入。

pip -V 

For Windows machine go to command prompt and type.

pip -V 

回答 9

检查两件事

pip2 --version   

pip3 --version

因为默认点可能是其中的任何一个,所以最好同时检查两者。

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.


回答 10

首先,打开命令提示符,然后键入以下命令。

轻松检查版本本身:

窗体Windows:

点安装:

pip install pip

pip版本检查:

pip --version 

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 

回答 11

`pip -v` or `pip --v` 

但是请注意,如果您使用的MacOS Catelina具有zsh(z外壳),则可能会给您很多帮助,因此最好的选择是尝试安装该版本或以 -- pip3

`pip -v` or `pip --v` 

However note, if you are using macos catelina which has the zsh (z shell) it might give you a whole bunch of things, so the best option is to try install the version or start as -- pip3


声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。