(已解决-pip本版问题)You are using pip version 21.1.2; however, version 22.1.2 is available

问题描述

(已解决-pip本版问题)You are using pip version 21.1.2; however, version 22.1.2 is available_第1张图片

WARNING: You are using pip version 21.1.2; however, version 22.1.2 is available.
You should consider upgrading via the 'C:\Users\PycharmProjects\pythonProject\venv\Scripts\python.exe -m pip install --upgrade pip' command.

直接按照提示在python.exe中输入 -m pip install --upgrade pip

(已解决-pip本版问题)You are using pip version 21.1.2; however, version 22.1.2 is available_第2张图片

经过查询百度,采用下面文章找到解决办法

新装IDEA建好python项目出现导包错误提示"You should consider upgrading via the 'python -m pip......_一只迷途的小狼的博客-CSDN博客_upgrading via新电脑安装IDEA后,建好python项目,在导包过程中发生了以下的错误情况~那我们经过观察,发现其实IDEA已经给我们提供好了解决的方案了:快捷键:win+R 输入cmd 进入命令窗口先使用命令查看已下pip的版本(pip 是 Python 包管理工具,该工具提供了对Python 包的查找、下载、安装、卸载的功能。)命令为 pip show pip出现下图所示反馈给我们一个信息,...https://blog.csdn.net/gududelang22/article/details/99419048

python执行pip指令时,提示“You should consider upgrading……”的解决方法_prelive的博客-CSDN博客WARNING: You are using pip version 21.1.2; however, version 21.3.1 is available.You should consider upgrading via the 'C:\Users\PycharmProjects\pythonProject\venv\Scripts\python.exe -m pip install --upgrade pip' command.https://blog.csdn.net/prelive/article/details/122745405

解决方法:
1.在Terminal输入: 

注:此处只涉及到本次项目的pip进行修改,其他项目不做修改

Windows PowerShell
版权所有 (C) Microsoft Corporation。保留所有权利。

尝试新的跨平台 PowerShell https://aka.ms/pscore6

PS C:\Users\euweb\PycharmProjects\pythonProject2> python -m pip install --upgrade pip
ages (21.3.1)
Collecting pip
  Downloading pip-22.1.2-py3-none-any.whl (2.1 MB)
     |████████████████████████████████| 2.1 MB 939 kB/s            
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 21.3.1
    Uninstalling pip-21.3.1:
      Successfully uninstalled pip-21.3.1
Successfully installed pip-22.1.2
PS C:\Users\euweb\PycharmProjects\pythonProject2>
PS C:\Users\euweb\PycharmProjects\pythonProject2> 

2.打开cmd(此办法没有验证,不过应该也可以)

注:修改全部的项目

(已解决-pip本版问题)You are using pip version 21.1.2; however, version 22.1.2 is available_第3张图片

总结:

降低pip到指定版本(通过PyCharm升级pip,在降低到原来版本)

方法1:直接在terminal中通过命令进行pip本版切换

 具体命令参照降低pip到指定版本(通过cmp升级pip,在降低到原来版本)

方法2:通过setting进行设置,具体操作流程如下所示

(已解决-pip本版问题)You are using pip version 21.1.2; however, version 22.1.2 is available_第4张图片

降低pip到指定版本(通过cmp升级pip,在降低到原来版本)

升级到最新本版脚本:python -m pip install --upgrade pip
指定版本升降的脚本:python -m pip install pip==21.2.4(22.1.2)
查看本版的脚本:pip show pip
C:\Users\euweb>python -m pip install pip==21.2.4
Defaulting to user installation because normal site-packages is not writeable
Collecting pip==21.2.4
  Downloading pip-21.2.4-py3-none-any.whl (1.6 MB)
     ---------------------------------------- 1.6/1.6 MB 4.1 MB/s eta 0:00:00
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 22.1.2
    Uninstalling pip-22.1.2:
      Successfully uninstalled pip-22.1.2
  WARNING: The scripts pip.exe, pip3.10.exe and pip3.exe are installed in 'C:\Users\euweb\AppData\Roaming\Python\Python310\Scripts' 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-21.2.4
 
C:\Users\euweb>pip show pip
Name: pip
Version: 21.2.4
Summary: The PyPA recommended tool for installing Python packages.
Home-page: https://pip.pypa.io/
Author: The pip developers
Author-email: [email protected]
License: MIT
Location: c:\users\euweb\appdata\roaming\python\python310\site-packages
Requires:
Required-by:

你可能感兴趣的:(python,问题排查,pip,python,linux)