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!
How can I fix this? See below
$ 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
EDIT: 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??
答案 0 :(得分:2)
这个问题在这里解决了:
How to suppress pip upgrade warning?
pip
存在一个已知问题,即使您拥有操作系统附带的pip版本,它也会打印该警告。使用此命令摆脱警告是安全的:
mkdir -p $HOME/.config/pip
printf "[global]\ndisable-pip-version-check = True\n" \
> $HOME/.config/pip/pip.conf
答案 1 :(得分:0)
您需要运行:
pip install --upgrade pip
两次。
第一次升级到版本8.1.0
,第二次升级到8.1.1
。在此之后将不再有任何警告。
答案 2 :(得分:0)
您可以使用系统软件包管理器
安装pip对于ubuntu / debian:
apt-get install python-pip
for arch:
pacman -S python-pip
每当新版本可用于您的发布时,包管理器将更新pip。
答案 3 :(得分:-1)
你可以用以下方法修复它:
code1 code2 code3
0 XXXHYG a 33
1 XXXTBG a 20
2 XXXECT b 42
3 XXXKOL b 51
4 XXXBTW c 49
它对我有用