1.安装python3 按照这篇文章安装python3 link 2.使用pip3安装ansible python3 -m pip install ansible ansible --version #此时默认解释器已经是python3了 参考doc