我是docker-compose的新手,当我键入docker-compose ps时会收到以下错误。
Traceback (most recent call last):
File "/usr/local/bin/docker-compose", line 7, in <module>
from compose.cli.main import main
File "/Library/Python/2.7/site-packages/compose/cli/main.py", line 20, in <module>
from ..bundle import get_image_digests
File "/Library/Python/2.7/site-packages/compose/bundle.py", line 14, in <module>
from .service import format_environment
File "/Library/Python/2.7/site-packages/compose/service.py", line 37, in <module>
from .parallel import parallel_execute
File "/Library/Python/2.7/site-packages/compose/parallel.py", line 10, in <module>
from six.moves import _thread as thread
ImportError: cannot import name _thread
答案 0 :(得分:0)
Docker-compose是由python编写的。看来你错过了一些python包。您可以参考以下页面来解决python lib问题。 Matplotlib issue on OS X ("ImportError: cannot import name _thread")
或者,您可以尝试将docker-compose安装为容器,docker容器包含docker-compose的适当环境。 https://docs.docker.com/compose/install/#install-as-a-container