Skip to content

python_install fails for multiple packages #15

Description

@zirkov

OS: Ubuntu
Release: Bionic

When 2 or more packages are required to be installed through python_install: [package1, package2] Ansible yields an error during run:

failed: [sm-ubuntu-02] (item=2.7) => {"changed": false, "cmd": ["/usr/local/bin/pip2.7", "install", "pyyaml requests"], "item": 2.7, "msg": "\n:stderr: DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.\nInvalid requirement: 'pyyaml requests'\n\n"}
failed: [sm-ubuntu-02] (item=3.6) => {"changed": false, "cmd": ["/usr/local/bin/pip3.6", "install", "pyyaml requests"], "item": 3.6, "msg": "\n:stderr: Invalid requirement: 'pyyaml requests'\n\n"}

Looking at this: "cmd": ["/usr/local/bin/pip3.6", "install", "pyyaml requests"] and the fact that 'pyyaml requests' is considered a single request, it seems that the space-separated string is somehow passed as a single parameter to pip install

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions