No module named shutil_get_terminal_size
haxorof opened this issue · 1 comments
haxorof commented
Running postinstall tests on Debian 10 ("Buster") fails with the following errors when it tries to use docker-compose (pyhon based). Seems to be related to Python 2
TASK [Test hello service] ******************************************************
Monday 03 August 2020 16:19:53 +0000 (0:00:06.110) 0:03:21.155 *********
fatal: [test-host]: FAILED! => {"changed": false, "msg": "Unable to load docker-compose. Try `pip install docker-compose`. Error: Traceback (most recent call last):\n File \"/tmp/ansible_docker_compose_payload_lJrfzM/__main__.py\", line 478, in <module>\n from compose.cli.main import convergence_strategy_from_opts, build_action_from_opts, image_type_from_opt\n File \"/usr/local/lib/python2.7/dist-packages/compose/cli/main.py\", line 52, in <module>\n from .formatter import ConsoleWarningFormatter\n File \"/usr/local/lib/python2.7/dist-packages/compose/cli/formatter.py\", line 15, in <module>\n from backports.shutil_get_terminal_size import get_terminal_size\nImportError: No module named shutil_get_terminal_size\n"}
...ignoring
...
TASK [Test hello service with sudo] ********************************************
Monday 03 August 2020 16:19:57 +0000 (0:00:01.865) 0:03:24.885 *********
fatal: [test-host]: FAILED! => {"changed": false, "msg": "Unable to load docker-compose. Try `pip install docker-compose`. Error: Traceback (most recent call last):\n File \"/tmp/ansible_docker_compose_payload_d2epsP/__main__.py\", line 478, in <module>\n from compose.cli.main import convergence_strategy_from_opts, build_action_from_opts, image_type_from_opt\n File \"/usr/local/lib/python2.7/dist-packages/compose/cli/main.py\", line 52, in <module>\n from .formatter import ConsoleWarningFormatter\n File \"/usr/local/lib/python2.7/dist-packages/compose/cli/formatter.py\", line 15, in <module>\n from backports.shutil_get_terminal_size import get_terminal_size\nImportError: No module named shutil_get_terminal_size\n"}
haxorof commented
Seems backport is install but needs to be copied to different location for it to work as done for ssl_match_hostname
.
cp -r /usr/local/lib/python2.7/dist-packages/backports/shutil_get_terminal_size/ /usr/lib/python2.7/dist-packages/backports