shell> docker-compose --version
docker-compose version 1.29.2, build 5becea4
安裝方式2:PIP
官方安裝說(shuō)明在這里。
安裝PIP:
shell> yum install -y python3-pip
給docker-compose文件添加執(zhí)行權(quán)限:
shell> pip3 install docker-compose
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Collecting docker-composeDownloading http://mirrors.tencentyun.com/pypi/packages/f3/3e/ca05e486d44e38eb495ca60b8ca526b192071717387346ed1031ecf78966/docker_compose-1.29.2-py2.py3-none-any.whl (114kB)...100% |████████████████████████████████| 573kB 2.8MB/s Complete output from command python setup.py egg_info:=============================DEBUG ASSISTANCE==========================If you are seeing an error here please try the following tosuccessfully install cryptography:Upgrade to the latest pip and try again. This will fix errors formostusers. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip=============================DEBUG ASSISTANCE==========================Traceback (most recent call last):File "<string>", line 1, in<module>File "/tmp/pip-build-7s6fe6so/cryptography/setup.py", line 14, in<module>from setuptools_rust import RustExtensionModuleNotFoundError: No module named 'setuptools_rust'----------------------------------------
檢查是否安裝成功
shell> docker-compose --version
docker-compose version 1.29.2, build 5becea4