python2.7 enum安装_[Docker]python 2.7.5 docker-compose安装

本文提供了在Python 2.7环境下使用Docker安装docker-compose的详细步骤,包括安装所需的依赖和执行一键安装脚本。通过执行脚本,成功安装了docker-compose版本1.24.1,并验证了安装结果。
摘要由CSDN通过智能技术生成

pip 安装参考本文

https://www.cnblogs.com/leoshi/p/12742195.html

一键安装脚本

cat > pip_install.sh<

yum install -y epel-release

yum install -y python-pip

# pip 更新

pip install -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com --upgrade pip

# 安装docker-compose

pip install -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com docker-compose==1.24.1

EOF

bash pip_install.sh

[[email protected] ~]# pip install -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com docker-compose==1.24.1

DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support

Looking in indexes: http://pypi.douban.com/simple/

Collecting docker-compose==1.24.1

Downloading http://pypi.doubanio.com/packages/dd/e6/1521d1dfd9c0da1d1863b18e592d91c3df222e55f258b9876fa1e59bc4b5/docker_compose-1.24.1-py2.py3-none-any.whl (134 kB)

|████████████████████████████████| 134 kB 1.1 MB/s

Requirement already satisfied: enum34<2,>=1.0.4; python_version < "3.4" in /usr/lib/python2.7/site-packages (from docker-compose==1.24.1) (1.1.10)

Requirement already satisfied: six<2,>=1.3.0 in /usr/lib/python2.7/site-packages (from docker-compose==1.24.1) (1.14.0)

Requirement already satisfied: backports.ssl-match-hostname>=3.5; python_version < "3.5" in /usr/lib/python2.7/site-packages (from docker-compose==1.24.1) (3.5.0.1)

Collecting texttable<0.10,>=0.9.0

Downloading http://pypi.doubanio.com/packages/02/e1/2565e6b842de7945af0555167d33acfc8a615584ef7abd30d1eae00a4d80/texttable-0.9.1.tar.gz (11 kB)

Requirement already satisfied: websocket-client<1.0,>=0.32.0 in /usr/lib/python2.7/site-packages (from docker-compose==1.24.1) (0.57.0)

Requirement already satisfied: ipaddress>=1.0.16; python_version < "3.3" in /usr/lib/python2.7/site-packages (from docker-compose==1.24.1) (1.0.16)

Requirement already satisfied: dockerpty<0.5,>=0.4.1 in /usr/lib/python2.7/site-packages (from docker-compose==1.24.1) (0.4.1)

Requirement already satisfied: cached-property<2,>=1.2.0 in /usr/lib/python2.7/site-packages (from docker-compose==1.24.1) (1.5.1)

Requirement already satisfied: docopt<0.7,>=0.6.1 in /usr/lib/python2.7/site-packages (from docker-compose==1.24.1) (0.6.2)

Collecting PyYAML<4.3,>=3.10

Downloading http://pypi.doubanio.com/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz (270 kB)

|████████████████████████████████| 270 kB 1.5 MB/s

Collecting docker[ssh]<4.0,>=3.7.0

Downloading http://pypi.doubanio.com/packages/09/da/7cc7ecdcd01145e9924a8ccbe9c1baf3a362fc75d4cb150676eb5231ea60/docker-3.7.3-py2.py3-none-any.whl (134 kB)

|████████████████████████████████| 134 kB 4.2 MB/s

Collecting jsonschema<3,>=2.5.1

Downloading http://pypi.doubanio.com/packages/77/de/47e35a97b2b05c2fadbec67d44cfcdcd09b8086951b331d82de90d2912da/jsonschema-2.6.0-py2.py3-none-any.whl (39 kB)

Collecting requests!=2.11.0,!=2.12.2,!=2.18.0,<2.21,>=2.6.1

Downloading http://pypi.doubanio.com/packages/ff/17/5cbb026005115301a8fb2f9b0e3e8d32313142fe8b617070e7baad20554f/requests-2.20.1-py2.py3-none-any.whl (57 kB)

|████████████████████████████████| 57 kB 727 kB/s

Collecting docker-pycreds>=0.4.0

Downloading http://pypi.doubanio.com/packages/f5/e8/f6bd1eee09314e7e6dee49cbe2c5e22314ccdb38db16c9fc72d2fa80d054/docker_pycreds-0.4.0-py2.py3-none-any.whl (9.0 kB)

Requirement already satisfied: paramiko>=2.4.2; extra == "ssh" in /usr/lib/python2.7/site-packages (from docker[ssh]<4.0,>=3.7.0->docker-compose==1.24.1) (2.7.1)

Requirement already satisfied: functools32; python_version == "2.7" in /usr/lib/python2.7/site-packages (from jsonschema<3,>=2.5.1->docker-compose==1.24.1) (3.2.3.post2)

Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python2.7/site-packages (from requests!=2.11.0,!=2.12.2,!=2.18.0,<2.21,>=2.6.1->docker-compose==1.24.1) (3.0.4)

Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python2.7/site-packages (from requests!=2.11.0,!=2.12.2,!=2.18.0,<2.21,>=2.6.1->docker-compose==1.24.1) (2020.4.5.1)

Collecting urllib3<1.25,>=1.21.1

Downloading http://pypi.doubanio.com/packages/01/11/525b02e4acc0c747de8b6ccdab376331597c569c42ea66ab0a1dbd36eca2/urllib3-1.24.3-py2.py3-none-any.whl (118 kB)

|████████████████████████████████| 118 kB 1.1 MB/s

Collecting idna<2.8,>=2.5

Downloading http://pypi.doubanio.com/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl (58 kB)

|████████████████████████████████| 58 kB 3.0 MB/s

Requirement already satisfied: bcrypt>=3.1.3 in /usr/lib64/python2.7/site-packages (from paramiko>=2.4.2; extra == "ssh"->docker[ssh]<4.0,>=3.7.0->docker-compose==1.24.1) (3.1.7)

Requirement already satisfied: pynacl>=1.0.1 in /usr/lib64/python2.7/site-packages (from paramiko>=2.4.2; extra == "ssh"->docker[ssh]<4.0,>=3.7.0->docker-compose==1.24.1) (1.3.0)

Requirement already satisfied: cryptography>=2.5 in /usr/lib64/python2.7/site-packages (from paramiko>=2.4.2; extra == "ssh"->docker[ssh]<4.0,>=3.7.0->docker-compose==1.24.1) (2.9)

Requirement already satisfied: cffi>=1.1 in /usr/lib64/python2.7/site-packages (from bcrypt>=3.1.3->paramiko>=2.4.2; extra == "ssh"->docker[ssh]<4.0,>=3.7.0->docker-compose==1.24.1) (1.14.0)

Requirement already satisfied: pycparser in /usr/lib/python2.7/site-packages (from cffi>=1.1->bcrypt>=3.1.3->paramiko>=2.4.2; extra == "ssh"->docker[ssh]<4.0,>=3.7.0->docker-compose==1.24.1) (2.20)

Installing collected packages: texttable, PyYAML, urllib3, idna, requests, docker-pycreds, docker, jsonschema, docker-compose

Running setup.py install for texttable ... done

Attempting uninstall: PyYAML

Found existing installation: PyYAML 5.3.1

Uninstalling PyYAML-5.3.1:

Successfully uninstalled PyYAML-5.3.1

Running setup.py install for PyYAML ... done

Attempting uninstall: urllib3

Found existing installation: urllib3 1.25.9

Uninstalling urllib3-1.25.9:

Successfully uninstalled urllib3-1.25.9

Attempting uninstall: idna

Found existing installation: idna 2.9

Uninstalling idna-2.9:

Successfully uninstalled idna-2.9

Attempting uninstall: requests

Found existing installation: requests 2.23.0

Uninstalling requests-2.23.0:

Successfully uninstalled requests-2.23.0

Attempting uninstall: docker

Found existing installation: docker 4.2.0

Uninstalling docker-4.2.0:

Successfully uninstalled docker-4.2.0

Attempting uninstall: jsonschema

Found existing installation: jsonschema 3.2.0

Uninstalling jsonschema-3.2.0:

Successfully uninstalled jsonschema-3.2.0

Successfully installed PyYAML-3.13 docker-3.7.3 docker-compose-1.24.1 docker-pycreds-0.4.0 idna-2.7 jsonschema-2.6.0 requests-2.20.1 texttable-0.9.1 urllib3-1.24.3

查看安装后的版本

[[email protected] ~]# docker-compose --version

docker-compose version 1.24.1, build 4667896

END

[Docker]python 2.7.5 docker-compose安装

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Python,可以使用python-docx库来操作Word文档,包括创建表格和设置表格样式。以下是一个简单的示例代码: ```python from docx import Document from docx.enum.table import WD_TABLE_ALIGNMENT from docx.enum.text import WD_ALIGN_PARAGRAPH from docx.shared import Cm # 创建文档对象 document = Document() # 添加表格 table = document.add_table(rows=3, cols=3) # 设置表格对齐方式 table.alignment = WD_TABLE_ALIGNMENT.CENTER # 设置表格样式 table.style = 'Table Grid' # 设置表格列宽 table.columns[0].width = Cm(4) table.columns[1].width = Cm(6) table.columns[2].width = Cm(8) # 设置表格内容 table.cell(0, 0).text = '姓名' table.cell(0, 1).text = '年龄' table.cell(0, 2).text = '城市' table.cell(1, 0).text = '张三' table.cell(1, 1).text = '25' table.cell(1, 2).text = '北京' table.cell(2, 0).text = '李四' table.cell(2, 1).text = '30' table.cell(2, 2).text = '上海' # 对齐表格内容 for row in table.rows: for cell in row.cells: paragraphs = cell.paragraphs for paragraph in paragraphs: paragraph.alignment = WD_ALIGN_PARAGRAPH.CENTER # 保存文档 document.save('example.docx') ``` 在上面的示例代码,我们首先导入了需要使用的库。然后,我们创建了一个新的Word文档对象,并添加了一个3行3列的表格。接下来,我们设置了表格的对齐方式和样式,以及每一列的宽度。然后,我们填充了表格的内容,并对齐了表格的文本。最后,我们保存了文档。 这只是一个简单的示例,您可以根据需要进行更改和扩展。有关更多信息,请参阅python-docx库的文档。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值