In OS X 10.10 Yosemite stürzt Ansible sofort mit Fehler ab: ImportError: Kein Modul mit dem Namen _compat

1205
Cory Klein

Auf OS X 10.10, Yosemity, nachdem brewich ansible mit installiert habe, starte ich es und es stürzt sofort ab:

$ ansible Traceback (most recent call last): File "/usr/local/Cellar/ansible/1.6.10/libexec/bin/ansible", line 5, in <module> pkg_resources.run_script('ansible==1.6.10', 'ansible') File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 492, in run_script self.require(requires)[0].run_script(script_name, ns) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 1350, in run_script execfile(script_filename, namespace, namespace) File "/usr/local/Cellar/ansible/1.6.10/lib/python2.7/site-packages/ansible-1.6.10-py2.7.egg/EGG-INFO/scripts/ansible", line 25, in <module> from ansible.runner import Runner File "/usr/local/Cellar/ansible/1.6.10/lib/python2.7/site-packages/ansible-1.6.10-py2.7.egg/ansible/runner/__init__.py", line 32, in <module> import jinja2 File "/usr/local/Cellar/ansible/1.6.10/libexec/lib/python2.7/site-packages/Jinja2-2.7.1-py2.7.egg/jinja2/__init__.py", line 33, in <module> from jinja2.environment import Environment, Template File "/usr/local/Cellar/ansible/1.6.10/libexec/lib/python2.7/site-packages/Jinja2-2.7.1-py2.7.egg/jinja2/environment.py", line 13, in <module> from jinja2 import nodes File "/usr/local/Cellar/ansible/1.6.10/libexec/lib/python2.7/site-packages/Jinja2-2.7.1-py2.7.egg/jinja2/nodes.py", line 18, in <module> from jinja2.utils import Markup File "/usr/local/Cellar/ansible/1.6.10/libexec/lib/python2.7/site-packages/Jinja2-2.7.1-py2.7.egg/jinja2/utils.py", line 520, in <module> from markupsafe import Markup, escape, soft_unicode File "/Library/Python/2.7/site-packages/markupsafe/__init__.py", line 14, in <module> from markupsafe._compat import text_type, string_types, int_types, \ ImportError: No module named _compat 
0

1 Antwort auf die Frage

1
Ismael Arenzana

Sie scheinen eine alte Version von Ansible zu verwenden, die neueste Version ist 1.7.2 in Homebrew. Wie hast du es installiert? Wenn Sie die Homebrew-Ausgabe verwendet haben

brew upgrade ansible 

und sehen, ob das hilft.