# Intermittent failures when using easy\_install

**URL:** <https://forum.ansible.com/t/intermittent-failures-when-using-easy-install/27202>\
**Category:** Ansible Project\
**Tags:** vmware\
**Created:** [April 6, 2018, 8:34am UTC](https://forum.ansible.com/t/intermittent-failures-when-using-easy-install/27202 "2018-04-06T08:34:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SurferL](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@SurferL](https://forum.ansible.com/u/SurferL)\
**Post date:** [April 6, 2018, 8:34am UTC](https://forum.ansible.com/t/intermittent-failures-when-using-easy-install/27202/1 "2018-04-06T08:34:42Z")

</div>

Running Ansible 2.4.1.

So sometimes running my task works, and other times it doesn’t and I don’t understand why this is happening…

The task is:

- name: mac | Install global python dependencies  
easy\_install:  
name: “{{ item }}”  
state: latest  
become: true  
with\_items:
- pip
- virtualenv

and it occasionally fails with:

vmware-vmx: TASK [common : mac | Install global python dependencies] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
vmware-vmx: failed: [default] (item=pip) =\> {“changed”: false, “failed”: true, “item”: “pip”, “msg”: “Couldn’t find index page for ‘pip’ (maybe misspelled?)\nNo local packages or download links found for pip\nerror: Could not find suitable distribution for Requirement.parse(‘pip’)\n”}  
vmware-vmx: failed: [default] (item=virtualenv) =\> {“changed”: false, “failed”: true, “item”: “virtualenv”, “msg”: “Couldn’t find index page for ‘virtualenv’ (maybe misspelled?)\nNo local packages or download links found for virtualenv\nerror: Could not find suitable distribution for Requirement.parse(‘virtualenv’)\n”}

But it sometimes passes?

Can anyone shed any light on why this happens or what I can change to my task?

Thanks!

---

<div class="post-metadata">

**Author:** ![Biswadip\_Dutta](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@Biswadip\_Dutta](https://forum.ansible.com/u/Biswadip_Dutta)\
**Post date:** [April 6, 2018, 2:11pm UTC](https://forum.ansible.com/t/intermittent-failures-when-using-easy-install/27202/2 "2018-04-06T14:11:42Z")

</div>

I am a newbie so don’t expect this to be the correct answer. Be sure to correct me if I am wrong.  
I’ll suggest using apt or yum module to install pip and then pip module to install virtualenv and check if the problem persists. If these also fail then we can always use the shell module to directly run ad-hoc commands.  
[This](https://stackoverflow.com/questions/26402123/ansible-creating-a-virtualenv) might be helpful.
