运维联盟俱乐部

 找回密码
 立即注册
查看: 2244|回复: 0

pip命令参考

[复制链接]
  • TA的每日心情
    开心
    2023-8-9 11:05
  • 发表于 2020-5-27 22:07:35 | 显示全部楼层 |阅读模式
    1.pip -h
    1.     C:\Users\zhyu>pip -h

    2.     Usage:
    3.       pip <command> [options]

    4.     Commands:
    5.       install                     Install packages.
    6.       download                    Download packages.
    7.       uninstall                   Uninstall packages.
    8.       freeze                      Output installed packages in requirements format.
    9.       list                        List installed packages.
    10.       show                        Show information about installed packages.
    11.       check                       Verify installed packages have compatible dependencies.
    12.       config                      Manage local and global configuration.
    13.       search                      Search PyPI for packages.
    14.       cache                       Inspect and manage pip's wheel cache.
    15.       wheel                       Build wheels from your requirements.
    16.       hash                        Compute hashes of package archives.
    17.       completion                  A helper command used for command completion.
    18.       debug                       Show information useful for debugging.
    19.       help                        Show help for commands.

    20.     General Options:
    21.       -h, --help                  Show help.
    22.       --isolated                  Run pip in an isolated mode, ignoring environment variables and user configuration.
    23.       -v, --verbose               Give more output. Option is additive, and can be used up to 3 times.
    24.       -V, --version               Show version and exit.
    25.       -q, --quiet                 Give less output. Option is additive, and can be used up to 3 times (corresponding to
    26.                                   WARNING, ERROR, and CRITICAL logging levels).
    27.       --log <path>                Path to a verbose appending log.
    28.       --proxy <proxy>             Specify a proxy in the form [user:passwd@]proxy.server:port.
    29.       --retries <retries>         Maximum number of retries each connection should attempt (default 5 times).
    30.       --timeout <sec>             Set the socket timeout (default 15 seconds).
    31.       --exists-action <action>    Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup,
    32.                                   (a)bort.
    33.       --trusted-host <hostname>   Mark this host or host:port pair as trusted, even though it does not have valid or any
    34.                                   HTTPS.
    35.       --cert <path>               Path to alternate CA bundle.
    36.       --client-cert <path>        Path to SSL client certificate, a single file containing the private key and the
    37.                                   certificate in PEM format.
    38.       --cache-dir <dir>           Store the cache data in <dir>.
    39.       --no-cache-dir              Disable the cache.
    40.       --disable-pip-version-check
    41.                                   Don't periodically check PyPI to determine whether a new version of pip is available for
    42.                                   download. Implied with --no-index.
    43.       --no-color                  Suppress colored output
    44.       --no-python-version-warning
    45.                                   Silence deprecation warnings for upcoming unsupported Pythons.




    复制代码
    2.更新pip

    1. C:\Users\zhyu>python -m pip install --upgrade pip
    2. Collecting pip
    3.   Downloading pip-20.2-py2.py3-none-any.whl (1.5 MB)
    4.      |████████████████████████████████| 1.5 MB 5.1 kB/s
    5. Installing collected packages: pip
    6.   Attempting uninstall: pip
    7.     Found existing installation: pip 20.1.1
    8.     Uninstalling pip-20.1.1:
    9.       Successfully uninstalled pip-20.1.1
    10. Successfully installed pip-20.2
    复制代码
    3.pip降级,有时候升级后一堆报错,还是降下去好
    1. C:\Users\zhyu>pip -V
    2. pip 20.2 from c:\python38\lib\site-packages\pip (python 3.8)

    3. C:\Users\zhyu>python -m pip install pip==20.1.1
    4. Collecting pip==20.1.1
    5.   Using cached pip-20.1.1-py2.py3-none-any.whl (1.5 MB)
    6. Installing collected packages: pip
    7.   Attempting uninstall: pip
    8.     Found existing installation: pip 20.2
    9.     Uninstalling pip-20.2:
    10.       Successfully uninstalled pip-20.2
    11. Successfully installed pip-20.1.1
    复制代码





    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    运维联盟俱乐部 ( 冀ICP备19036648号 )

    GMT+8, 2024-5-10 12:45 , Processed in 0.047884 second(s), 21 queries , Gzip On.

    Powered by Discuz! X3.4

    © 2001-2023 Discuz! Team.

    快速回复 返回顶部 返回列表