{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/47361","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/47361/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/47361/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/47361/events","html_url":"https://github.com/ansible/ansible/issues/47361","id":372063529,"node_id":"MDU6SXNzdWUzNzIwNjM1Mjk=","number":47361,"title":"pip: No setuptools found in remote host, please install it first.","user":{"login":"chopraaa","id":360979,"node_id":"MDQ6VXNlcjM2MDk3OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/360979?v=4","gravatar_id":"","url":"https://api.github.com/users/chopraaa","html_url":"https://github.com/chopraaa","followers_url":"https://api.github.com/users/chopraaa/followers","following_url":"https://api.github.com/users/chopraaa/following{/other_user}","gists_url":"https://api.github.com/users/chopraaa/gists{/gist_id}","starred_url":"https://api.github.com/users/chopraaa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chopraaa/subscriptions","organizations_url":"https://api.github.com/users/chopraaa/orgs","repos_url":"https://api.github.com/users/chopraaa/repos","events_url":"https://api.github.com/users/chopraaa/events{/privacy}","received_events_url":"https://api.github.com/users/chopraaa/received_events","type":"User","site_admin":false},"labels":[{"id":1043397454,"node_id":"MDU6TGFiZWwxMDQzMzk3NDU0","url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.8","name":"affects_2.8","color":"ededed","default":false},{"id":785271699,"node_id":"MDU6TGFiZWw3ODUyNzE2OTk=","url":"https://api.github.com/repos/ansible/ansible/labels/bug","name":"bug","color":"fbca04","default":true},{"id":496359346,"node_id":"MDU6TGFiZWw0OTYzNTkzNDY=","url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false},{"id":383076471,"node_id":"MDU6TGFiZWwzODMwNzY0NzE=","url":"https://api.github.com/repos/ansible/ansible/labels/python3","name":"python3","color":"fbca04","default":false},{"id":636352796,"node_id":"MDU6TGFiZWw2MzYzNTI3OTY=","url":"https://api.github.com/repos/ansible/ansible/labels/support:core","name":"support:core","color":"ededed","default":false},{"id":942378949,"node_id":"MDU6TGFiZWw5NDIzNzg5NDk=","url":"https://api.github.com/repos/ansible/ansible/labels/traceback","name":"traceback","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2018-10-19T18:16:00Z","updated_at":"2018-10-29T09:32:26Z","closed_at":"2018-10-21T21:47:50Z","author_association":"NONE","body":"##### SUMMARY\r\n`pip` seems to be broken in 2.8.\r\n\r\n##### ISSUE TYPE\r\n- Bug Report\r\n\r\n##### COMPONENT NAME\r\npip\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.8.0.dev0 (win-part-devel 202a9aa06c) last updated 2018/09/28 21:59:26 (GMT +000)\r\n  config file = None\r\n  configured module search path = [u'/home/vagrant/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /workspace/ansible/lib/ansible\r\n  executable location = /workspace/ansible/bin/ansible\r\n  python version = 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0]\r\n```\r\n\r\n##### STEPS TO REPRODUCE\r\nThe following works in Ansible 2.6 without errors:\r\n\r\n```yaml\r\n- name: Install dependencies\r\n  apt:\r\n    name:\r\n      - python3\r\n      - python3-pip\r\n      - python3-setuptools\r\n    state: latest\r\n    update_cache: True\r\n- name: Install required pip packages\r\n  pip:\r\n    name:\r\n      - argparse\r\n      - bleach\r\n      - requests-toolbelt\r\n    executable: pip3\r\n```\r\n\r\nBut in Ansible 2.8:\r\n\r\n```\r\nfatal: []: FAILED! => {\"changed\": false, \"msg\": \"No setuptools found in remote host, please install it first.\"}\r\n```\r\n\r\n##### EXPECTED RESULTS\r\n```\r\nTASK [Install required pip packages] ***********************************************************************\r\nchanged: [1]\r\nchanged: [2]\r\nchanged: [3]\r\n```\r\n\r\n##### ACTUAL RESULTS\r\n```\r\nThe full traceback is:\r\nWARNING: The below traceback may *not* be related to the actual failure.\r\n  File \"/tmp/ansible_pip_payload_mQPVtz/__main__.py\", line 240, in <module>\r\n    from pkg_resources import Requirement\r\n\r\nfatal: [x]: FAILED! => {\r\n    \"changed\": false,\r\n    \"invocation\": {\r\n        \"module_args\": {\r\n            \"chdir\": null,\r\n            \"editable\": false,\r\n            \"executable\": \"pip3\",\r\n            \"extra_args\": null,\r\n            \"name\": [\r\n                \"argparse\",\r\n                \"bleach\",\r\n                \"requests-toolbelt\"\r\n            ],\r\n            \"requirements\": null,\r\n            \"state\": \"present\",\r\n            \"umask\": null,\r\n            \"use_mirrors\": true,\r\n            \"version\": null,\r\n            \"virtualenv\": null,\r\n            \"virtualenv_command\": \"virtualenv\",\r\n            \"virtualenv_python\": null,\r\n            \"virtualenv_site_packages\": false\r\n        }\r\n    },\r\n    \"msg\": \"No setuptools found in remote host, please install it first.\"\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/433843300","html_url":"https://github.com/ansible/ansible/issues/47361#issuecomment-433843300","issue_url":"https://api.github.com/repos/ansible/ansible/issues/47361","id":433843300,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzg0MzMwMA==","user":{"login":"mkjpryor-stfc","id":13452123,"node_id":"MDQ6VXNlcjEzNDUyMTIz","avatar_url":"https://avatars1.githubusercontent.com/u/13452123?v=4","gravatar_id":"","url":"https://api.github.com/users/mkjpryor-stfc","html_url":"https://github.com/mkjpryor-stfc","followers_url":"https://api.github.com/users/mkjpryor-stfc/followers","following_url":"https://api.github.com/users/mkjpryor-stfc/following{/other_user}","gists_url":"https://api.github.com/users/mkjpryor-stfc/gists{/gist_id}","starred_url":"https://api.github.com/users/mkjpryor-stfc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkjpryor-stfc/subscriptions","organizations_url":"https://api.github.com/users/mkjpryor-stfc/orgs","repos_url":"https://api.github.com/users/mkjpryor-stfc/repos","events_url":"https://api.github.com/users/mkjpryor-stfc/events{/privacy}","received_events_url":"https://api.github.com/users/mkjpryor-stfc/received_events","type":"User","site_admin":false},"created_at":"2018-10-29T09:32:26Z","updated_at":"2018-10-29T09:32:26Z","author_association":"NONE","body":"I am having this same problem when using `virtualenv` and `virtualenv_command`.\r\n\r\nIt seems that the `pip` module is making the check _before_ creating the virtualenv, because if it did the check on the virtualenv after creating it, it would see that setuptools and pip are both present _in the virtualenv_. I don't really want to install them into my system Python unnecessarily."}}
{"actor":{"display_login":"mkjpryor-stfc"}}