python:升级pip版本(Python 3.11.4)

发布时间 2023-08-09 10:20:30作者: 刘宏缔的架构森林

一,查看当前pip的版本:

[root@img Python-3.11.4]# pip --version
pip 23.1.2 from /usr/local/soft/python3.11.4/lib/python3.11/site-packages/pip (python 3.11)

二,升级pip:

[root@img Python-3.11.4]# python3 -m pip install --upgrade pip
Looking in indexes: http://mirrors.cloud.aliyuncs.com/pypi/simple/
Requirement already satisfied: pip in /usr/local/soft/python3.11.4/lib/python3.11/site-packages (23.1.2)
Collecting pip
  Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/50/c2/e06851e8cc28dcad7c155f4753da8833ac06a5c704c109313b8d5a62968a/pip-23.2.1-py3-none-any.whl (2.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 21.5 MB/s eta 0:00:00
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 23.1.2
    Uninstalling pip-23.1.2:
      Successfully uninstalled pip-23.1.2
  WARNING: The scripts pip, pip3 and pip3.11 are installed in '/usr/local/soft/python3.11.4/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-23.2.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

三,升级完成后查看效果: 

[root@img Python-3.11.4]# pip --version
pip 23.2.1 from /usr/local/soft/python3.11.4/lib/python3.11/site-packages/pip (python 3.11)

说明:刘宏缔的架构森林—专注it技术的博客,
网站:https://blog.imgtouch.com
原文: https://blog.imgtouch.com/index.php/2023/08/03/python-sheng-ji-pip-ban-ben-python-3-11-4/
代码: https://github.com/liuhongdi/ 或 https://gitee.com/liuhongdi
说明:作者:刘宏缔 邮箱: 371125307@qq.com

四,查看python版本:

[root@img Python-3.11.4]# python --version
Python 3.11.4