Docker-Compose的安装依赖于python-pip的构建,python-pip所依赖的版本
>=2.7
安装python-pip
- 检查python-pip
pip -v
- 安装epel
yum -y install epel-release
- 安装python-pip
yum -y install python-pip
- 升级pip
pip install --upgrade pip
- 检查安装
pip -V
出现如下提示:代表安装成功
pip 18.1 from /usr/lib/python2.7/site-packages/pip (python 2.7)
安装Docker-Compose
pip install docker-compose
出现如下信息,表示安装成功:
Installing collected packages: PyYAML, six, websocket-client, docker-pycreds, urllib3, idna, chardet, certifi, requests, docker, texttable, dockerpty, enum34, docopt, functools32, jsonschema, cached-property, docker-compose
Running setup.py install for PyYAML ... done
Running setup.py install for texttable ... done
Running setup.py install for dockerpty ... done
Running setup.py install for docopt ... done
Running setup.py install for functools32 ... done
Successfully installed PyYAML-3.13 cached-property-1.5.1 certifi-2018.8.24 chardet-3.0.4 docker-3.5.0 docker-compose-1.22.0 docker-pycreds-0.3.0 dockerpty-0.4.1 docopt-0.6.2 enum34-1.1.6 functools32-3.2.3.post2 idna-2.6 jsonschema-2.6.0 requests-2.18.4 six-1.11.0 texttable-0.9.1 urllib3-1.22 websocket-client-0.53.0
注意:
- 连接超时:
pip --default-timeout=200 install -U docker-compose
backports.ssl-match-hostname
版本低
pip install --upgrade backports.ssl_match_hostname