0

I am trying to install ansible via pip, but installation failed with these errors. Basicly the core ansible is installed but I have a feeling that not all modules/ ansible_collections are installed

#python3 -m pip install --upgrade --user ansible
Collecting ansible
  Using cached ansible-4.10.0.tar.gz (36.8 MB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: ansible-core~=2.11.7 in /usr/local/lib/python3.6/site-packages (from ansible) (2.11.12)
Requirement already satisfied: jinja2 in /usr/local/lib/python3.6/site-packages (from ansible-core~=2.11.7->ansible) (3.0.3)
Requirement already satisfied: PyYAML in /usr/local/lib64/python3.6/site-packages (from ansible-core~=2.11.7->ansible) (6.0)
Requirement already satisfied: cryptography in /usr/local/lib64/python3.6/site-packages (from ansible-core~=2.11.7->ansible) (40.0.1)
Requirement already satisfied: packaging in /usr/local/lib/python3.6/site-packages (from ansible-core~=2.11.7->ansible) (21.3)
Requirement already satisfied: resolvelib<0.6.0,>=0.5.3 in /usr/local/lib/python3.6/site-packages (from ansible-core~=2.11.7->ansible) (0.5.4)
Requirement already satisfied: cffi>=1.12 in /usr/local/lib64/python3.6/site-packages (from cryptography->ansible-core~=2.11.7->ansible) (1.15.1)
Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib64/python3.6/site-packages (from jinja2->ansible-core~=2.11.7->ansible) (2.0.1)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/local/lib/python3.6/site-packages (from packaging->ansible-core~=2.11.7->ansible) (3.0.9)
Requirement already satisfied: pycparser in /usr/local/lib/python3.6/site-packages (from cffi>=1.12->cryptography->ansible-core~=2.11.7->ansible) (2.21)
Building wheels for collected packages: ansible
  Building wheel for ansible (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-j1e8ee0o/ansible_739f732c70454ae68e5938304ea21a71/setup.py'"'"'; __file__='"'"'/tmp/pip-install-j1e8ee0o/ansible_739f732c70454ae68e5938304ea21a71/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-188w1992
       cwd: /tmp/pip-install-j1e8ee0o/ansible_739f732c70454ae68e5938304ea21a71/
  Complete output (4095 lines):
  running bdist_wheel
  running build
  running build_py
  package init file 'ansible_collections/__init__.py' not found (or not a regular file)
  creating build
  creating build/lib
  creating build/lib/ansible_collections
  copying ansible_collections/ansible_release.py -> build/lib/ansible_collections
...
... final error
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3cu3mwhw/ansible_acd23d78d456418e9c4c2c02e0e9312a/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3cu3mwhw/ansible_acd23d78d456418e9c4c2c02e0e9312a/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-dysgpttw/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /root/.local/include/python3.6m/ansible Check the logs for full command output.
#


when I try install wheel, i get this error

#/root/.local/bin/pip install wheel
Requirement already satisfied: wheel in /usr/local/lib/python3.6/site-packages (0.37.1)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#

0

You must log in to answer this question.

Browse other questions tagged .