On Wed, Dec 1, 2021 at 3:11 AM Bond James <kyr...@gmail.com> wrote: > > Have some problem > ansible --version > ERROR! Unexpected Exception, this is probably a bug: module > 'ansible.constants' has no attribute 'CONTROLLER_PYTHON_WARNING' > the full traceback was: > > Traceback (most recent call last): > File "/usr/bin/ansible", line 76, in <module> > if C.CONTROLLER_PYTHON_WARNING and not _PY38_MIN: > AttributeError: module 'ansible.constants' has no attribute > 'CONTROLLER_PYTHON_WARNING'
> > After > $ pip uninstall ansible ansible-base > $ pip install ansible==5.0.0 --user Which tries to install the dependency ansible-core >= 2.12.0. Unfortunately, ansible-core of that bleeding edge version really does require python 3.8 or later now, and some operating systems don't have one built in. In particular, the 'python3' on RHEL 7 and RHEL 8 is only python 3.6, and the one on Amazon Linux 2 is only python 3.7. This is a *BIG* problem for ansible servers, it's a problem for AWX, and I'd be very curious indeed how the host Red Hat (which bought ansible.com) is dealing with it for Ansible Tower. I would run "python --version" and "python3 --version" to see if your current python is recent enough. if not, you're not going to be able to use the new "ansible-core" until you install a newer python by hook or by crook for use by ansible-core and the "ansible" python tarball. The mislabeling of the ansible-collections as a published python module called "ansible" is its own issue that is confusing and concealing the python-core python 3.8 issues. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAOCN9rzZMkw-_%2B7RT0WZ456pP88AaFVMh97udcuGUNRCnX6Asw%40mail.gmail.com.