我刚刚在Raspberry Pi3上全新安装了Docker和Compose。 Docker运行良好。但是,当我尝试使用Compose进行任何操作时,都会出现此错误
pi@raspberrypi:~ $ docker-compose
Traceback (most recent call last):
File "/usr/local/bin/docker-compose", line 6, in <module>
from compose.cli.main import main
File "/usr/local/lib/python2.7/dist-packages/compose/cli/main.py", line 52, in <module>
from .formatter import ConsoleWarningFormatter
File "/usr/local/lib/python2.7/dist-packages/compose/cli/formatter.py", line 15, in <module>
from backports.shutil_get_terminal_size import get_terminal_size
ImportError: No module named shutil_get_terminal_size
通过pip
安装了Compose。知道会丢失什么吗?
今天有同样的问题。做
sudo apt-get -y install python3-pip
pip3 install docker-compose
像魅力一样工作。