# Error while trying to install vim using Python API

**URL:** <https://forum.ansible.com/t/error-while-trying-to-install-vim-using-python-api/20447>\
**Category:** Ansible Project\
**Created:** [February 4, 2016, 9:48am UTC](https://forum.ansible.com/t/error-while-trying-to-install-vim-using-python-api/20447 "2016-02-04T09:48:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shreyas\_Patil](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@Shreyas\_Patil](https://forum.ansible.com/u/Shreyas_Patil)\
**Post date:** [February 4, 2016, 9:48am UTC](https://forum.ansible.com/t/error-while-trying-to-install-vim-using-python-api/20447/1 "2016-02-04T09:48:15Z")

</div>

Hi,

I get the following error while I try to install vim on the remote server using python ansible API.

fatal: [162.243.55.156]: FAILED! =\> {“changed”: false, “cmd”: “apt-get update ‘&&’ apt-get install python-apt -y -q --force-yes”, “failed”: true, “msg”: “/bin/sh: apt-get: command not found”, “rc”: 127, “stderr”: “/bin/sh: apt-get: command not found\n”, “stdout”: “”, “stdout\_lines”: }

Doing similar steps on server runs fine without any issues.

Any help in this regard is appreciated.

Regards,  
\_Shreyas.

---

<div class="post-metadata">

**Author:** ![FangYu\_Liao](https://avatars.discourse-cdn.com/v4/letter/f/cdc98d/32.png) [@FangYu\_Liao](https://forum.ansible.com/u/FangYu_Liao)\
**Post date:** [May 12, 2016, 7:30am UTC](https://forum.ansible.com/t/error-while-trying-to-install-vim-using-python-api/20447/2 "2016-05-12T07:30:13Z")

</div>

Hi, are you solve this problem?  
Because I have the same problem like you…

Shreyas Patil於 2016年2月4日星期四 UTC+8下午5時48分15秒寫道：

---

<div class="post-metadata">

**Author:** ![Johannes\_Kastl](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@Johannes\_Kastl](https://forum.ansible.com/u/Johannes_Kastl)\
**Post date:** [May 15, 2016, 7:49am UTC](https://forum.ansible.com/t/error-while-trying-to-install-vim-using-python-api/20447/3 "2016-05-15T07:49:26Z")

</div>

Why not use the ansible apt-module?

[https://docs.ansible.com/ansible/apt\_module.html](https://docs.ansible.com/ansible/apt_module.html)

Johannes
