python命令pip list

查看安装python版本

windows cmd 中:python
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul  8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit();

pip list检查是否已存在需要的包

windows cmd 中:pip list
Package    Version
---------- --------
pip        21.2.4
setuptools 40.8.0
you-get    0.4.1545
WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.
You should consider upgrading via the 'e:program filespythonpython.exe -m pip install --upgrade pip' command.

windows cmd 中:python -m pip install --upgrade pip
Requirement already satisfied: pip in e:program filespythonlibsite-packages (21.2.4)
Collecting pip
  Downloading pip-21.3.1-py3-none-any.whl (1.7 MB)
     |████████████████████████████████| 1.7 MB 37 kB/s
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 21.2.4
    Uninstalling pip-21.2.4:
      Successfully uninstalled pip-21.2.4
Successfully installed pip-21.3.1

 

你可能感兴趣的