CentOS8默认安装了Python36 以及 pip3
[root@Docker ~]# pip3 install -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com --upgrade pip
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Collecting pip
Downloading http://pypi.doubanio.com/packages/43/84/23ed6a1796480a6f1a2d38f2802901d078266bda38388954d01d3f2e821d/pip-20.1.1-py2.py3-none-any.whl (1.5MB)
100% |████████████████████████████████| 1.5MB 12.0MB/s
Installing collected packages: pip
Successfully installed pip-20.1.1
[root@Docker ~]# pip3 install -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com docker-compose
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Looking in indexes: http://pypi.douban.com/simple/
Collecting docker-compose
Downloading http://pypi.doubanio.com/packages/43/bf/a9fe1f4b6e0f2ceac7eb7e2dab2fd03edd2fd5ffa8cd90d55ba1453af8b7/docker_compose-1.26.2-py2.py3-none-any.whl (139 kB)
|████████████████████████████████| 139 kB 1.4 MB/s
Collecting docopt<1,>=0.6.1
Downloading http://pypi.doubanio.com/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz (25 kB)
Collecting websocket-client<1,>=0.32.0
Downloading http://pypi.doubanio.com/packages/4c/5f/f61b420143ed1c8dc69f9eaec5ff1ac36109d52c80de49d66e0c36c3dfdf/websocket_client-0.57.0-py2.py3-none-any.whl (200 kB)
|████████████████████████████████| 200 kB 904 kB/s
Collecting jsonschema<4,>=2.5.1
Downloading http://pypi.doubanio.com/packages/c5/8f/51e89ce52a085483359217bc72cdbf6e75ee595d5b1d4b5ade40c7e018b8/jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
|████████████████████████████████| 56 kB 467 kB/s
Collecting docker[ssh]<5,>=4.2.2
Downloading http://pypi.doubanio.com/packages/3c/15/7a2f095a3b8b0fff9a0a5f56bd941e05fa958d4ca31105541001a5f7d3eb/docker-4.2.2-py2.py3-none-any.whl (144 kB)
|████████████████████████████████| 144 kB 559 kB/s
Collecting distro<2,>=1.5.0
Downloading http://pypi.doubanio.com/packages/25/b7/b3c4270a11414cb22c6352ebc7a83aaa3712043be29daa05018fd5a5c956/distro-1.5.0-py2.py3-none-any.whl (18 kB)
Requirement already satisfied: six<2,>=1.3.0 in /usr/lib/python3.6/site-packages (from docker-compose) (1.11.0)
Collecting dockerpty<1,>=0.4.1
Downloading http://pypi.doubanio.com/packages/8d/ee/e9ecce4c32204a6738e0a5d5883d3413794d7498fe8b06f44becc028d3ba/dockerpty-0.4.1.tar.gz (13 kB)
Collecting cached-property<2,>=1.2.0
Downloading http://pypi.doubanio.com/packages/3b/86/85c1be2e8db9e13ef9a350aecd6dea292bd612fa288c2f40d035bb750ded/cached_property-1.5.1-py2.py3-none-any.whl (6.0 kB)
Collecting python-dotenv<1,>=0.13.0
Downloading http://pypi.doubanio.com/packages/f2/16/28d434b28c5be29a6af8fd0e3a2bda3bd30500ef0cd17bc79f7a6793a8d4/python_dotenv-0.14.0-py2.py3-none-any.whl (17 kB)
Collecting texttable<2,>=0.9.0
Downloading http://pypi.doubanio.com/packages/ec/b1/8a1c659ce288bf771d5b1c7cae318ada466f73bd0e16df8d86f27a2a3ee7/texttable-1.6.2-py2.py3-none-any.whl (10 kB)
Collecting requests<3,>=2.20.0
Downloading http://pypi.doubanio.com/packages/45/1e/0c169c6a5381e241ba7404532c16a21d86ab872c9bed8bdcd4c423954103/requests-2.24.0-py2.py3-none-any.whl (61 kB)
|████████████████████████████████| 61 kB 571 kB/s
Requirement already satisfied: PyYAML<6,>=3.10 in /usr/lib64/python3.6/site-packages (from docker-compose) (3.12)
Collecting pyrsistent>=0.14.0
Downloading http://pypi.doubanio.com/packages/9f/0d/cbca4d0bbc5671822a59f270e4ce3f2195f8a899c97d0d5abb81b191efb5/pyrsistent-0.16.0.tar.gz (108 kB)
|████████████████████████████████| 108 kB 396 kB/s
Collecting attrs>=17.4.0
Downloading http://pypi.doubanio.com/packages/a2/db/4313ab3be961f7a763066401fb77f7748373b6094076ae2bda2806988af6/attrs-19.3.0-py2.py3-none-any.whl (39 kB)
Requirement already satisfied: setuptools in /usr/lib/python3.6/site-packages (from jsonschema<4,>=2.5.1->docker-compose) (39.2.0)
Collecting importlib-metadata; python_version < "3.8"
Downloading http://pypi.doubanio.com/packages/8e/58/cdea07eb51fc2b906db0968a94700866fc46249bdc75cac23f9d13168929/importlib_metadata-1.7.0-py2.py3-none-any.whl (31 kB)
Collecting paramiko>=2.4.2; extra == "ssh"
Downloading http://pypi.doubanio.com/packages/06/1e/1e08baaaf6c3d3df1459fd85f0e7d2d6aa916f33958f151ee1ecc9800971/paramiko-2.7.1-py2.py3-none-any.whl (206 kB)
|████████████████████████████████| 206 kB 405 kB/s
Collecting certifi>=2017.4.17
Downloading http://pypi.doubanio.com/packages/5e/c4/6c4fe722df5343c33226f0b4e0bb042e4dc13483228b4718baf286f86d87/certifi-2020.6.20-py2.py3-none-any.whl (156 kB)
|████████████████████████████████| 156 kB 1.3 MB/s
Collecting idna<3,>=2.5
Downloading http://pypi.doubanio.com/packages/a2/38/928ddce2273eaa564f6f50de919327bf3a00f091b5baba8dfa9460f3a8a8/idna-2.10-py2.py3-none-any.whl (58 kB)
|████████████████████████████████| 58 kB 357 kB/s
Collecting chardet<4,>=3.0.2
Downloading http://pypi.doubanio.com/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133 kB)
|████████████████████████████████| 133 kB 732 kB/s
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
Downloading http://pypi.doubanio.com/packages/e1/e5/df302e8017440f111c11cc41a6b432838672f5a70aa29227bf58149dc72f/urllib3-1.25.9-py2.py3-none-any.whl (126 kB)
|████████████████████████████████| 126 kB 865 kB/s
Collecting zipp>=0.5
Downloading http://pypi.doubanio.com/packages/b2/34/bfcb43cc0ba81f527bc4f40ef41ba2ff4080e047acb0586b56b3d017ace4/zipp-3.1.0-py3-none-any.whl (4.9 kB)
Collecting pynacl>=1.0.1
Downloading http://pypi.doubanio.com/packages/9d/57/2f5e6226a674b2bcb6db531e8b383079b678df5b10cdaa610d6cf20d77ba/PyNaCl-1.4.0-cp35-abi3-manylinux1_x86_64.whl (961 kB)
|████████████████████████████████| 961 kB 532 kB/s
Collecting cryptography>=2.5
Downloading http://pypi.doubanio.com/packages/3c/04/686efee2dcdd25aecf357992e7d9362f443eb182ecd623f882bc9f7a6bba/cryptography-2.9.2-cp35-abi3-manylinux2010_x86_64.whl (2.7 MB)
|████████████████████████████████| 2.7 MB 1.6 MB/s
Collecting bcrypt>=3.1.3
Downloading http://pypi.doubanio.com/packages/8b/1d/82826443777dd4a624e38a08957b975e75df859b381ae302cfd7a30783ed/bcrypt-3.1.7-cp34-abi3-manylinux1_x86_64.whl (56 kB)
|████████████████████████████████| 56 kB 460 kB/s
Collecting cffi>=1.4.1
Downloading http://pypi.doubanio.com/packages/f1/c7/72abda280893609e1ddfff90f8064568bd8bcb2c1770a9d5bb5edb2d1fea/cffi-1.14.0-cp36-cp36m-manylinux1_x86_64.whl (399 kB)
|████████████████████████████████| 399 kB 1.2 MB/s
Collecting pycparser
Downloading http://pypi.doubanio.com/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl (112 kB)
|████████████████████████████████| 112 kB 823 kB/s
Using legacy setup.py install for docopt, since package 'wheel' is not installed.
Using legacy setup.py install for dockerpty, since package 'wheel' is not installed.
Using legacy setup.py install for pyrsistent, since package 'wheel' is not installed.
Installing collected packages: docopt, websocket-client, pyrsistent, attrs, zipp, importlib-metadata, jsonschema, certifi, idna, chardet, urllib3, requests, pycparser, cffi, pynacl, cryptography, bcrypt, paramiko, docker, distro, dockerpty, cached-property, python-dotenv, texttable, docker-compose
Running setup.py install for docopt ... done
Running setup.py install for pyrsistent ... done
Running setup.py install for dockerpty ... done
Successfully installed attrs-19.3.0 bcrypt-3.1.7 cached-property-1.5.1 certifi-2020.6.20 cffi-1.14.0 chardet-3.0.4 cryptography-2.9.2 distro-1.5.0 docker-4.2.2 docker-compose-1.26.2 dockerpty-0.4.1 docopt-0.6.2 idna-2.10 importlib-metadata-1.7.0 jsonschema-3.2.0 paramiko-2.7.1 pycparser-2.20 pynacl-1.4.0 pyrsistent-0.16.0 python-dotenv-0.14.0 requests-2.24.0 texttable-1.6.2 urllib3-1.25.9 websocket-client-0.57.0 zipp-3.1.0
查看安装版本
[root@Docker ~]# docker-compose --version
docker-compose version 1.26.2, build unknown
END