centos6和centos7环境包含python2.7和python3.6及pip2和pip3环境
20
从官方源拉取镜像二次封装, 安装python3和pip2和pip3环境
docker exec -it 57d814b3a59d /bin/bash
yum install epel-release
yum install python36
#python 多版本共存下安装pip,通过get_pip.py脚本
yum install wget
wget https://bootstrap.pypa.io/pip/3.6/get-pip.py
#使用脚本自动安装pip
python3 get-pip.py
#查看pip版本
pip --version
pip3 --version
#原自带python2.7环境, 没有安装pip
wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
python2 get-pip.py
pip2 --version
#不同版本get-pip, 3.7以上版本才会自动识别安装哪个版本pip
https://bootstrap.pypa.io/pip/2.7/get-pip.py
https://bootstrap.pypa.io/pip/3.6/get-pip.py
https://bootstrap.pypa.io/pip/get-pip.py
Content type
Image
Digest
Size
72.6 MB
Last updated
about 4 years ago
docker pull leeyom/centos:centos7