linux python、python3 安装pip

一、python2.* 安装pip

1、ubuntu

sudo apt-get install python-pip

2、centos

yum install python-pip
	错误1:可能会显示 找不到包或什么都不做
	yum install epel-release
	yum install python-pip

	错误2:可能会出现: One of the configured repositories failed(Unknown)
	yum remove epel-release

二、python3.* 安装pip

ubuntu、centos

wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
错误1:ModuleNotFoundError: No module named 'distutils.cmd'

sudo apt-get install python-distutils

上面的命令可能找不到任何程序,再试试

sudo apt-get install python3-distutils

你可能感兴趣的:(linux,python,pip,centos,ubuntu)