小编laj*_*ode的帖子

升级 ansible 以在控制器上使用 python3

我想将 ansible 更改为在控制器上使用 python3.5。我已经安装了ansible和python3.5,有没有办法将其更改为使用python3?

ansible 文档建议使用 ansible 和python3 /usr/bin/ansible localhost -m ping. 但是,如果这不起作用,请不要提供更多细节。

我的结果是:

Traceback (most recent call last):
    File "/usr/bin/ansible", line 32, in <module>
        from ansible import context
ImportError: No module named 'ansible'
Run Code Online (Sandbox Code Playgroud)

我也尝试过 pip3 install ansible 没有运气:

      File "<string>", line 1, in <module>
      File "/tmp/pip-build-eadti4n6/ansible/setup.py", line 12
        print "Ansible now needs setuptools in order to build. " \
                                                               ^
    SyntaxError: Missing parentheses in call to 'print'
Run Code Online (Sandbox Code Playgroud)

ubuntu python-3.x ansible

5
推荐指数
2
解决办法
1万
查看次数

标签 统计

ansible ×1

python-3.x ×1

ubuntu ×1