Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installing dependency docker-compose with pip3 fails #492

Open
d10r opened this issue Nov 13, 2020 · 0 comments
Open

installing dependency docker-compose with pip3 fails #492

d10r opened this issue Nov 13, 2020 · 0 comments

Comments

@d10r
Copy link

d10r commented Nov 13, 2020

I was setting up an AMB oracle following instructions in https://docs.tokenbridge.net/amb-bridge/arbitrary-message-bridge-deployment/2-tokenbridge-oracle-instance, using a virgin Ubuntu 18.04 target.

$ ansible-playbook -e 'ansible_python_interpreter=/usr/bin/python3' -i hosts.yml site.yml
...
TASK [common : Install python docker library] ***************************************************************************************************************************************************************
fatal: [95.216.217.155]: FAILED! => {"changed": true, "cmd": "pip3 install docker docker-compose setuptools", "delta": "0:00:01.980818", "end": "2020-11-13 14:12:02.450033", "msg": "non-zero return code", "rc": 1, "start": "2020-11-13 14:12:00.469215", "stderr": "    ERROR: Command errored out with exit status 1:\n     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '\"'\"'/tmp/pip-install-1wef4f88/dockerpty/setup.py'\"'\"'; __file__='\"'\"'/tmp/pip-install-1wef4f88/dockerpty/setup.py'\"'\"';f=getattr(tokenize, '\"'\"'open'\"'\"', open)(__file__);code=f.read().replace('\"'\"'\\r\\n'\"'\"', '\"'\"'\\n'\"'\"');f.close();exec(compile(code, __file__, '\"'\"'exec'\"'\"'))' egg_info --egg-base /tmp/pip-pip-egg-info-kndur3cn\n         cwd: /tmp/pip-install-1wef4f88/dockerpty/\n    Complete output (3 lines):\n    Traceback (most recent call last):\n      File \"<string>\", line 1, in <module>\n    ModuleNotFoundError: No module named 'setuptools'\n    ----------------------------------------\nERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.", "stderr_lines": ["    ERROR: Command errored out with exit status 1:", "     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '\"'\"'/tmp/pip-install-1wef4f88/dockerpty/setup.py'\"'\"'; __file__='\"'\"'/tmp/pip-install-1wef4f88/dockerpty/setup.py'\"'\"';f=getattr(tokenize, '\"'\"'open'\"'\"', open)(__file__);code=f.read().replace('\"'\"'\\r\\n'\"'\"', '\"'\"'\\n'\"'\"');f.close();exec(compile(code, __file__, '\"'\"'exec'\"'\"'))' egg_info --egg-base /tmp/pip-pip-egg-info-kndur3cn", "         cwd: /tmp/pip-install-1wef4f88/dockerpty/", "    Complete output (3 lines):", "    Traceback (most recent call last):", "      File \"<string>\", line 1, in <module>", "    ModuleNotFoundError: No module named 'setuptools'", "    ----------------------------------------", "ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output."], "stdout": "Collecting docker\n  Downloading docker-4.3.1-py2.py3-none-any.whl (145 kB)\nCollecting docker-compose\n  Downloading docker_compose-1.27.4-py2.py3-none-any.whl (110 kB)\nCollecting setuptools\n  Downloading setuptools-50.3.2-py3-none-any.whl (785 kB)\nRequirement already satisfied: requests!=2.18.0,>=2.14.2 in /usr/lib/python3/dist-packages (from docker) (2.18.4)\nCollecting websocket-client>=0.32.0\n  Downloading websocket_client-0.57.0-py2.py3-none-any.whl (200 kB)\nRequirement already satisfied: six>=1.4.0 in /usr/lib/python3/dist-packages (from docker) (1.11.0)\nCollecting python-dotenv<1,>=0.13.0\n  Downloading python_dotenv-0.15.0-py2.py3-none-any.whl (18 kB)\nRequirement already satisfied: PyYAML<6,>=3.10 in /usr/lib/python3/dist-packages (from docker-compose) (3.12)\nCollecting dockerpty<1,>=0.4.1\n  Downloading dockerpty-0.4.1.tar.gz (13 kB)", "stdout_lines": ["Collecting docker", "  Downloading docker-4.3.1-py2.py3-none-any.whl (145 kB)", "Collecting docker-compose", "  Downloading docker_compose-1.27.4-py2.py3-none-any.whl (110 kB)", "Collecting setuptools", "  Downloading setuptools-50.3.2-py3-none-any.whl (785 kB)", "Requirement already satisfied: requests!=2.18.0,>=2.14.2 in /usr/lib/python3/dist-packages (from docker) (2.18.4)", "Collecting websocket-client>=0.32.0", "  Downloading websocket_client-0.57.0-py2.py3-none-any.whl (200 kB)", "Requirement already satisfied: six>=1.4.0 in /usr/lib/python3/dist-packages (from docker) (1.11.0)", "Collecting python-dotenv<1,>=0.13.0", "  Downloading python_dotenv-0.15.0-py2.py3-none-any.whl (18 kB)", "Requirement already satisfied: PyYAML<6,>=3.10 in /usr/lib/python3/dist-packages (from docker-compose) (3.12)", "Collecting dockerpty<1,>=0.4.1", "  Downloading dockerpty-0.4.1.tar.gz (13 kB)"]}  

I then tried to do that manually on the target in an ssh session:

# pip3 install docker-compose
Collecting docker-compose
  Using cached docker_compose-1.27.4-py2.py3-none-any.whl (110 kB)
Collecting python-dotenv<1,>=0.13.0
  Using cached python_dotenv-0.15.0-py2.py3-none-any.whl (18 kB)
Collecting requests<3,>=2.20.0
  Downloading requests-2.25.0-py2.py3-none-any.whl (61 kB)
     |████████████████████████████████| 61 kB 2.8 MB/s 
Requirement already satisfied: PyYAML<6,>=3.10 in /usr/lib/python3/dist-packages (from docker-compose) (3.12)
Collecting texttable<2,>=0.9.0
  Downloading texttable-1.6.3-py2.py3-none-any.whl (10 kB)
Requirement already satisfied: websocket-client<1,>=0.32.0 in /usr/local/lib/python3.6/dist-packages (from docker-compose) (0.57.0)
Collecting cached-property<2,>=1.2.0
  Downloading cached_property-1.5.2-py2.py3-none-any.whl (7.6 kB)
Collecting distro<2,>=1.5.0
  Downloading distro-1.5.0-py2.py3-none-any.whl (18 kB)
Collecting docopt<1,>=0.6.1
  Downloading docopt-0.6.2.tar.gz (25 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-7stclzk6/docopt/setup.py'"'"'; __file__='"'"'/tmp/pip-install-7stclzk6/docopt/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-quvjndi1
         cwd: /tmp/pip-install-7stclzk6/docopt/
    Complete output (3 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ModuleNotFoundError: No module named 'setuptools'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Could be solved with apt install python3-setuptools.
I propose to either mention that requirement in the docs or to add that dependency to the Ansible scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant