【问题标题】:AttributeError: 'module' object has no attribute 'moves'AttributeError:“模块”对象没有属性“移动”
【发布时间】:2016-09-15 14:43:13
【问题描述】:

我正在尝试安装 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'

【问题讨论】:

  • 如果您改为通过 pip 安装 Ansible 会发生什么?可能是 Debian 软件包在某处缺少 Python 依赖项。
  • 您使用的是什么发行版和版本?你在关注the installation instructions吗?
  • @ydaetskcoR 我目前遇到了点子问题,但我会报告回来。上次好像没用。
  • @XiongChiamiov 我正在通过 Crouton 运行 Trusty Ubuntu

标签: python ansible


【解决方案1】:

Ansible 还很年轻,操作系统封装还很落后。尽管此特定错误可能只是由版本不匹配或缺少依赖项引起的。

我可以推荐running Ansible from source吗?

【讨论】:

    猜你喜欢
    • 2010-11-18
    • 2018-08-28
    相关资源
    最近更新 更多