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

问题描述

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

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

新装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到指定版本(通过PyCharm升级pip,在降低到原来版本)

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

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

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

降低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: distutils-sig@python.org
License: MIT
Location: c:\users\euweb\appdata\roaming\python\python310\site-packages
Requires:
Required-by:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

静文·红·精灵

您的鼓励是我创作的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值