No OS X 10.10 Yosemite, ansible falha imediatamente com erro: ImportError: Nenhum módulo chamado _compat

0

No OS X 10.10 Yosemity, depois de instalar ansible com brew , eu o executo e ele cai imediatamente assim:

$ 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
    
por Cory Klein 30.07.2014 / 19:52

1 resposta

1

Você parece estar executando uma versão antiga do ansible, o mais recente é o 1.7.2 no homebrew. Como você instalou? Se você usou o problema Homebrew

brew upgrade ansible

e veja se isso ajuda.

    
por 17.10.2014 / 20:25