我的pip版本有问题——每个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.
我不喜欢这里给出的答案:如何摆脱pip的升级警告?因为它们都想让pip与RH版本不同步。
所以我尝试了一个干净的系统安装,使用了这个VagrantFile:
Vagrant.configure("2") do |config|
config.ssh.username = 'root'
config.ssh.password = 'vagrant'
config.ssh.insert_key = 'true'
config.vm.box = "bento/centos-7.3"
config.vm.provider "virtualbox" do |vb|
vb.cpus = "4"
vb.memory = "2048"
end
config.vm.synced_folder "..", "/vagrant"
config.vm.network "public_network", bridge: "eth0", ip: "192.168.1.31"
config.vm.provision "shell", inline: <<-SHELL
set -x
# Install pip
yum install -y epel-release
yum install -y python-pip
pip freeze # See if pip prints version warning on fresh OS install.
SHELL
end
但后来我得到了:
==> default: ++ pip freeze
==> default: You are using pip version 8.1.2, however version 9.0.1 is available.
==> default: You should consider upgrading via the 'pip install --upgrade pip' command.
看起来我使用了错误的命令来安装pip
。正确的命令是什么?