# Installing Ansible from source?

**URL:** <https://forum.ansible.com/t/installing-ansible-from-source/18919>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [August 2, 2015, 4:34pm UTC](https://forum.ansible.com/t/installing-ansible-from-source/18919 "2015-08-02T16:34:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![O\_haya](https://avatars.discourse-cdn.com/v4/letter/o/ea666f/32.png) [@O\_haya](https://forum.ansible.com/u/O_haya)\
**Post date:** [August 2, 2015, 4:34pm UTC](https://forum.ansible.com/t/installing-ansible-from-source/18919/1 "2015-08-02T16:34:53Z")

</div>

Hi,

I’m trying to install Ansible from source, following this page:

However, I get to this step:

`

> [root@centos65 ansible]#  
> source ./hacking/env-setup  
>   
>   
>   
>   
> Ansible now needs  
> setuptools in order to build. Install it using your package manager (usually  
> python-setuptools) or via pip (pip install setuptools).  
>   
>   
>   
>   
>   
>   
>   
>   
>   
> Setting up Ansible to run  
> out of checkout…  
>   
>   
>   
>   
>   
>   
>   
>   
>   
> PATH=/root/ansible/bin:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin  
>   
>   
>   
>   
> PYTHONPATH=/root/ansible/lib:  
>   
>   
>   
>   
> MANPATH=/root/ansible/docs/man:  
>   
>   
>   
>   
>   
>   
>   
>   
>   
> Remember, you may wish to  
> specify your host file with -i  
>   
>   
>   
>   
>   
>   
>   
>   
>   
> Done!  
>   
>   
>   
>   
>   
>   
>   
> |
> 
> - |

`

and I’m not quite sure what to do after that.

I’ve tried various different things, like just do yum install python-setuptools, etc. but I think I’m always not ending up with a good Ansible installation.

I’m currently like that, but when I try run win\_ping I am getting:

`

[root@centos65 ansible]# ansible windows -i host -m win\_ping  
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: NameError: name ' **AnsibleError’ is not defined**  
[ansible1.enclave2.whatever.com](http://ansible1.enclave2.whatever.com) | FAILED! =\> {  
“failed”: true,  
“stdout”: “”  
}  
[root@centos65 ansible]#

`

and:

`

[root@centos65 ansible]# ansible windows -i host -m win\_ping -vvvv  
No config file found; using defaults  
Loaded callback minimal of type stdout, v2.0  
An exception occurred during task execution. The full traceback is:  
Traceback (most recent call last):  
File “/root/ansible/lib/ansible/executor/process/worker.py”, line 118, in run  
executor\_result = TaskExecutor(host, task, job\_vars, new\_play\_context, self.\_new\_stdin, self.\_loader, shared\_loader\_obj).run()  
File “/root/ansible/lib/ansible/executor/task\_executor.py”, line 117, in run  
res = self.\_execute()  
File “/root/ansible/lib/ansible/executor/task\_executor.py”, line 265, in \_execute  
self.\_connection = self.\_get\_connection(variables)  
File “/root/ansible/lib/ansible/executor/task\_executor.py”, line 440, in \_get\_connection  
connection = connection\_loader.get(conn\_type, self.\_play\_context, self.\_new\_stdin)  
File “/root/ansible/lib/ansible/plugins/ **init**.py”, line 282, in get  
self.\_module\_cache[path] = imp.load\_source(‘.’.join([self.package, name]), path)  
File “/root/ansible/lib/ansible/plugins/connections/winrm.py”, line 34, in   
raise AnsibleError(“winrm is not installed”)  
NameError: name ‘AnsibleError’ is not defined

[ansible1.enclave2.whatever.com](http://ansible1.enclave2.whatever.com) | FAILED! =\> {  
“failed”: true,  
“stdout”: “”  
}  
[root@centos65 ansible]#

`

So can anyone tell me the correct way to install this from source?

Thanks,  
Jim

---

<div class="post-metadata">

**Author:** ![O\_haya](https://avatars.discourse-cdn.com/v4/letter/o/ea666f/32.png) [@O\_haya](https://forum.ansible.com/u/O_haya)\
**Post date:** [August 2, 2015, 4:36pm UTC](https://forum.ansible.com/t/installing-ansible-from-source/18919/2 "2015-08-02T16:36:58Z")

</div>

Sorry forgot to link the page I’m following:

[http://docs.ansible.com/ansible/intro\_installation.html#getting-ansible](http://docs.ansible.com/ansible/intro_installation.html#getting-ansible)

---

<div class="post-metadata">

**Author:** ![O\_haya](https://avatars.discourse-cdn.com/v4/letter/o/ea666f/32.png) [@O\_haya](https://forum.ansible.com/u/O_haya)\
**Post date:** [August 2, 2015, 4:37pm UTC](https://forum.ansible.com/t/installing-ansible-from-source/18919/3 "2015-08-02T16:37:20Z")

</div>

[http://docs.ansible.com/ansible/intro\_installation.html#getting-ansible](http://docs.ansible.com/ansible/intro_installation.html#getting-ansible)

[http://docs.ansible.com/ansible/intro\_installation.html#getting-ansible](http://docs.ansible.com/ansible/intro_installation.html#getting-ansible)

---

<div class="post-metadata">

**Author:** ![O\_haya](https://avatars.discourse-cdn.com/v4/letter/o/ea666f/32.png) [@O\_haya](https://forum.ansible.com/u/O_haya)\
**Post date:** [August 2, 2015, 5:24pm UTC](https://forum.ansible.com/t/installing-ansible-from-source/18919/4 "2015-08-02T17:24:34Z")

</div>

I’m not sure exactly how I did it, but I seemed to have gotten a good installation. At one point, it was weird and seemed to have blown away all of the paths to “ansible” (i.e., so I couldn’t run “ansible”). I did make and make install in the Ansible dir and then that seemed to have fixed things up??

Jim
