# Missing dependencies when provisioning Ubuntu with Ansible - Developers’ Notes

Source: https://www.ironin.it/blog/missing-dependencies-when-provisioning-ubuntu-with-ansible-developers-notes.html

Published 14 March 2017

[developers notes](https://www.ironin.it/blog/tags/developers-notes) [devops](https://www.ironin.it/blog/tags/devops)

![Missing dependencies when provisioning Ubuntu with Ansible - Developers’ Notes](https://www.ironin.it/api/media/file/ironin-seed-ZTNiZDRjY2ItOGY2MS00YzhjLWJlZmEtZTY3MjBmYTJkOTcx_missing-dependencies-when-provisioning-ubuntu-with-ansible.jpg)

If you ever get an error while trying to provision an Ubuntu server with Ansible, check whether it’s not a case of a mismatched Python interpreter.

Today we wanted to provision one of our Ubuntu servers with Ansible and got an error: `/bin/sh: 1: /usr/bin/python: not found\r\n`

After a quick search it turned out you need to explicitly provide a path to the `python3` interpreter, which is installed by default (instead of the Python 2 version):

```ruby
[your-server]
ip.ip.ip.ip ansible_user=ubuntu ansible_python_interpreter=/usr/bin/python3
```

Seems easy, so we did it and retried the playbook. Then we hit another error: `Could not find aptitude. Please ensure it is installed`.

Ubuntu does not come with `aptitude` by default any more (at least on AWS; on Vagrant the playbook ran fine), and it’s used by Ansible (link to the [issue on Github](https://github.com/ansible/ansible/issues/18987)). It turned out we can solve this by defining a `pre-task` in the playbook to install it:

```ruby
pre_tasks:
  - name: 'install aplitude'
    raw: sudo apt-get install -y aptitude
    become: true
    become_user: root
    become_method: sudo
```

Today’s Developers’ Notes were prepared by Łukasz, our Web Application Development Team Leader. Stay tuned, because there’s more where this came from!

Share:

Author: iRonin IT Team

Need software like this built?

[Software development →](https://www.ironin.it/ai-software-engineering)

Our code is merged into 10 open-source AI-agent projects, two of them with tens of thousands of GitHub stars.

[Talk to us →](https://www.ironin.it/contact-us.html?offer=ai-software-engineering)

## Read similar articles

- [What is Fine-Tuning, and How Can It Help Your Performance in Practice?](https://www.ironin.it/blog/what-is-fine-tuning.html)
- [A gentle introduction to Python for hardcore Rubyists](https://www.ironin.it/blog/python-introduction-for-ruby-devs.html)
- [Tutorial - A serverless web service with Node.js](https://www.ironin.it/blog/tutorial-a-serverless-web-service-with-node.html)
- [Docker 101](https://www.ironin.it/blog/docker-101.html)

## Read next

- [Which AI model is best for your own task? Our own test and a public leaderboard disagreed](https://www.ironin.it/blog/own-ai-model-evals.html)
- [What uses up a Claude plan's usage limit? What each kind of token costs against it](https://www.ironin.it/blog/claude-usage-limit-token-costs.html)
- [Deploying Jekyll website to Heroku](https://www.ironin.it/blog/deploying-jekyll-website-to-heroku.html)
