运行docker-compose -f docker/common/docker-compose.yml up
时出现错误:
Traceback (most recent call last):
File "/usr/bin/docker-compose", line 5, in <module>
from compose.cli.main import main
File "/usr/lib/python2.7/site-packages/compose/cli/main.py", line 18, in <module>
import docker.errors
File "/usr/lib/python2.7/site-packages/docker/__init__.py", line 2, in <module>
from .api import APIClient
File "/usr/lib/python2.7/site-packages/docker/api/__init__.py", line 2, in <module>
from .client import APIClient
File "/usr/lib/python2.7/site-packages/docker/api/client.py", line 5, in <module>
import requests
File "/usr/lib/python2.7/site-packages/requests/__init__.py", line 43, in <module>
import urllib3
File "/usr/lib/python2.7/site-packages/urllib3/__init__.py", line 10, in <module>
from .connectionpool import (
File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 31, in <module>
from .connection import (
File "/usr/lib/python2.7/site-packages/urllib3/connection.py", line 45, in <module>
from .util.ssl_ import (
File "/usr/lib/python2.7/site-packages/urllib3/util/__init__.py", line 4, in <module>
from .request import make_headers
Python版本:Python 2.7.5
上面的命令过去在最新的系统更新之前可以正常工作。
UPDATE
将Python升级到3.x,然后将docker-compose升级到最新版本解决了此问题。
请将系统python更新到3.X并安装最新版本的docker compose