如何摆脱从pip升级的警告? [英] How can I get rid of this warning to upgrade from pip?

查看:289
本文介绍了如何摆脱从pip升级的警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我使用pip时,它都会警告我我的pip已过期,并且我需要通过执行pip install --upgrade pip对其进行升级.

Whenever I use pip, it warns me that my pip is out of date and that I need to upgrade it by doing pip install --upgrade pip.

但是当我这样做时,它似乎没有任何作用,只是告诉我同样的事情.是圆形的!

But when I do that it seemingly has no effect and simply tells me the same thing. It's circular!

我该如何解决?见下文

$ pip install --upgrade pip
You are using pip version 6.0.8, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Requirement already up-to-date: pip in my-virtualenv/lib/python2.7/site-packages

:我正在运行Red Hat Enterprise Linux(在AWS上).所以我只是尝试卸载并重新安装python-pip.当我这样做时,它会告诉我它将安装pip 6.1.1.-1.21.amzn1.如何安装更新版本?

I'm running Red Hat Enterprise Linux (on AWS). So I just tried uninstalling and reinstalling python-pip. When I did that it tells me it will install pip 6.1.1.-1.21.amzn1. How can I make it install the newer version??

推荐答案

此问题已在此处解决:

如何取消pip升级警告?

pip存在一个已知问题,即使您具有操作系统随附的pip版本,它也会打印该警告.使用以下命令可以消除警告:

There is a known issue with pip where it will print that warning even if you have the version of pip that shipped with your OS. It is safe to get rid of the warning with this command:

mkdir -p $HOME/.config/pip
printf "[global]\ndisable-pip-version-check = True\n" \
  > $HOME/.config/pip/pip.conf

这篇关于如何摆脱从pip升级的警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆