我正在尝试安装 Ansible,但由于某种原因我永远无法进行全新安装。使用 apt-get install ansible
然后执行 ansible --version
我得到以下输出:
Traceback (most recent call last):
File "/usr/bin/ansible", line 44, in <module>
import ansible.constants as C
File "/usr/lib/python2.7/dist-packages/ansible/constants.py", line 26, in <module>
from ansible.compat.six import string_types
File "/usr/lib/python2.7/dist-packages/ansible/compat/six/__init__.py", line 40, in <module>
not hasattr(_system_six.moves, 'shlex_quote') or
AttributeError: 'module' object has no attribute 'moves'
最佳答案
Ansible 还很年轻,操作系统打包也很落后。虽然此特定错误可能只是由版本不匹配或缺少依赖项引起的。
我可以建议 running Ansible from source ?
关于python - 属性错误 : 'module' object has no attribute 'moves' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39514019/