You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ERROR! Unexpected Exception, this is probably a bug: invalid syntax (specifiers.py, line 39)
the full traceback was:
Traceback (most recent call last):
File "/usr/bin/ansible-playbook", line 104, in
mycli = getattr(import("ansible.cli.%s" % sub, fromlist=[myclass]), myclass)
File "/usr/lib/python2.7/site-packages/ansible/cli/init.py", line 21, in
from ansible.inventory.manager import InventoryManager
File "/usr/lib/python2.7/site-packages/ansible/inventory/manager.py", line 38, in
from ansible.plugins.loader import inventory_loader
File "/usr/lib/python2.7/site-packages/ansible/plugins/loader.py", line 35, in
from packaging.specifiers import SpecifierSet
File "/usr/lib/python2.7/site-packages/packaging/specifiers.py", line 39
class BaseSpecifier(metaclass=abc.ABCMeta):
^
SyntaxError: invalid syntax
The text was updated successfully, but these errors were encountered:
Check Python Version Compatibility. Ensure that Ansible and its dependencies are running in a Python 3 environment. Ansible 2.8 and later versions require Python 3.5+ for most functionalities, although some backward compatibility with Python 2.7 exists. However, the packaging module likely expects Python 3.
You can check the Python version being used by Ansible by running:
python --version
ansible --version
If shows Python 2.7, you'll need to install Python 3.
ERROR! Unexpected Exception, this is probably a bug: invalid syntax (specifiers.py, line 39)
the full traceback was:
Traceback (most recent call last):
File "/usr/bin/ansible-playbook", line 104, in
mycli = getattr(import("ansible.cli.%s" % sub, fromlist=[myclass]), myclass)
File "/usr/lib/python2.7/site-packages/ansible/cli/init.py", line 21, in
from ansible.inventory.manager import InventoryManager
File "/usr/lib/python2.7/site-packages/ansible/inventory/manager.py", line 38, in
from ansible.plugins.loader import inventory_loader
File "/usr/lib/python2.7/site-packages/ansible/plugins/loader.py", line 35, in
from packaging.specifiers import SpecifierSet
File "/usr/lib/python2.7/site-packages/packaging/specifiers.py", line 39
class BaseSpecifier(metaclass=abc.ABCMeta):
^
SyntaxError: invalid syntax
The text was updated successfully, but these errors were encountered: