首页 > 解决方案 > Ansible-Playbook:错误消息“找不到任何要使用的 pip3。需要安装 pip”

问题描述

我尝试在我的剧本中通过 ansible 安装 boto3。

我试图在我的主机上创建一个新用户。

- name: "test user"
  hosts: test
  tasks:
   - name: "install boto3"
      pip:
        name: boto3
        executable: pip3

我收到了这条消息:

{"changed": false, "msg": "Unable to find any of pip3 to use.  pip needs to be installed."}

标签: ansible

解决方案


在失败步骤之前安装 Python3-pip

- name: install pip3
  apt: name=python3-pip state=present 

推荐阅读