# supporting alternate install path for library files.

**URL:** <https://forum.ansible.com/t/supporting-alternate-install-path-for-library-files/12811>\
**Category:** Ansible Project\
**Created:** [May 15, 2013, 5:13pm UTC](https://forum.ansible.com/t/supporting-alternate-install-path-for-library-files/12811 "2013-05-15T17:13:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Timothy\_Appnel](https://avatars.discourse-cdn.com/v4/letter/t/e5b9ba/32.png) [@Timothy\_Appnel](https://forum.ansible.com/u/Timothy_Appnel)\
**Post date:** [May 15, 2013, 5:13pm UTC](https://forum.ansible.com/t/supporting-alternate-install-path-for-library-files/12811/1 "2013-05-15T17:13:28Z")

</div>

Some months ago I had a problem installing Ansible at work because of our non-standard Linux setup. setup.py tries to install them to /usr/share regardless of standard --home and --root overrides. More details in the pull request here:

[https://github.com/ansible/ansible/pull/2408](https://github.com/ansible/ansible/pull/2408)

While addressing the issue of alternate install paths wasn't argued, that patch got rejected because my approach was not satisfactory. Fair enough. I tried. Is anything happening to address this though? What is a better way of addressing this than supporting the standard switches in distutils?

\<tim/\>

---

<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:** [May 15, 2013, 6:01pm UTC](https://forum.ansible.com/t/supporting-alternate-install-path-for-library-files/12811/2 "2013-05-15T18:01:33Z")

</div>

I’m still standing by my original comments in the pull request.

Ansible is a systems management app that happens to be written in Python, so “setup.py” isn’t really something that is a supported way of installing things.

Most users will be using the OS packages or running from source, and I don’t really see the need to support some arguments that only 2 or 3 python developers here know about.

“make install” is never a good way to install software. You really want to use OS packages.

Setup.py can be used to create a tarball and you’re welcome to do what you want with the contents inside that tarball.

–Michael

---

<div class="post-metadata">

**Author:** ![GW1](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@GW1](https://forum.ansible.com/u/GW1)\
**Post date:** [May 16, 2013, 10:47pm UTC](https://forum.ansible.com/t/supporting-alternate-install-path-for-library-files/12811/3 "2013-05-16T22:47:34Z")

</div>

Hi,

Why don’t you install in it a virtualenv ([http://www.virtualenv.org/en/latest/](http://www.virtualenv.org/en/latest/))? This is the most safe and flexible way for using, deploying and installing various versions of Python modules.

On the system just install python, pip and virtualenv, than use as a non-root user:

cd my\_ansible\_folder  
virtualenv venv  
source venv/bin/activate  
pip install ansible  
(pip install )

For usage then just:

cd my\_ansible\_folder  
source venv/bin/activate  
ansible-playbook site.yml

If you really want to install it on the system you can also do this with a Python package manager like pip (just don’t source the venv, but you need to be root).

Greetings,  
gw
