# "No module named subprocess" on copy

**URL:** <https://forum.ansible.com/t/no-module-named-subprocess-on-copy/13277>\
**Category:** Ansible Project\
**Created:** [August 9, 2013, 11:16am UTC](https://forum.ansible.com/t/no-module-named-subprocess-on-copy/13277 "2013-08-09T11:16:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marc\_Patermann](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@Marc\_Patermann](https://forum.ansible.com/u/Marc_Patermann)\
**Post date:** [August 9, 2013, 11:16am UTC](https://forum.ansible.com/t/no-module-named-subprocess-on-copy/13277/1 "2013-08-09T11:16:36Z")

</div>

Hi,

I created a playbook to copy a file to the servers.  
I another playbook I fetched the files.  
(I just started with Ansible.)

Fetching the file worked well.  
Now I changed two files and wanted to copy them back to the two servers, one in test, one in production ("produktion").

But coping back to the production server fails.  
I created the action as a one-shot and get the same error:

:/etc/ansible # ansible -i produktion -m copy -a "src=roles/bup/files/proxy.pac/sths052.proxy.pac dest=/www/texte/proxy/internet.pac" sths052.ofd-h.de  
sths052.ofd-h.de | FAILED \>\> {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"failed": true,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"msg": "Traceback (most recent call last):\n File \"/home/lotti/.ansible/tmp/ansible-1376046525.25-61012031318607/file\", line 317, in ?\n import subprocess\nImportError: No module named subprocess\n",  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"parsed": false  
}

The file exists.  
The tasks works (with the test server).  
Accessing the production server works too, I fetched the file.

What is the problem here?

Marc

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [August 9, 2013, 12:19pm UTC](https://forum.ansible.com/t/no-module-named-subprocess-on-copy/13277/2 "2013-08-09T12:19:54Z")

</div>

subprocess has been part of Python for a long time, so this is curious.

Ansible requires python 2.4 (and simplejson) or python 2.5+ on remote hosts.

What Python do you have there?

If you need to specify another you can set ansible\_python\_interpreter as an inventory variable (see docs).

let me know, thanks!

---

<div class="post-metadata">

**Author:** ![Marc\_Patermann](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@Marc\_Patermann](https://forum.ansible.com/u/Marc_Patermann)\
**Post date:** [August 12, 2013, 6:22am UTC](https://forum.ansible.com/t/no-module-named-subprocess-on-copy/13277/3 "2013-08-12T06:22:49Z")

</div>

Michael,

Michael DeHaan schrieb (09.08.2013 14:19 Uhr):

> subprocess has been part of Python for a long time, so this is curious.
> 
> Ansible requires python 2.4 (and simplejson) or python 2.5+ on remote hosts.
> 
> What Python do you have there?
> 
> If you need to specify another you can set ansible\_python\_interpreter as an inventory variable (see docs).

Oh dear, these are pretty old SLES 9 server as it turns out.  
Python there is 2.3.3. ☹

Marc
