# Run from source hacking script broken?

**URL:** <https://forum.ansible.com/t/run-from-source-hacking-script-broken/20372>\
**Category:** Ansible Developer\
**Created:** [January 28, 2016, 6:49pm UTC](https://forum.ansible.com/t/run-from-source-hacking-script-broken/20372 "2016-01-28T18:49:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![marc.petrivelli](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/marc.petrivelli/32/3773_2.png) [@marc.petrivelli](https://forum.ansible.com/u/marc.petrivelli)\
**Post date:** [January 28, 2016, 6:49pm UTC](https://forum.ansible.com/t/run-from-source-hacking-script-broken/20372/1 "2016-01-28T18:49:49Z")

</div>

I followed the instructions here: [http://docs.ansible.com/ansible/intro\_installation.html#running-from-source](http://docs.ansible.com/ansible/intro_installation.html#running-from-source)

However when I run ansible from the newly cloned repo, I get the following error:

mpetrive@mpetrive-laptop ~/sandbox/ansible $ ansible -v  
Traceback (most recent call last):  
File “/home/mpetrive/sandbox/ansible\_fresh/bin/ansible”, line 39, in   
from ansible.errors import AnsibleError, AnsibleOptionsError, AnsibleParserError  
ImportError: cannot import name AnsibleOptionsError

Any idea what the issue is?

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [January 28, 2016, 6:50pm UTC](https://forum.ansible.com/t/run-from-source-hacking-script-broken/20372/2 "2016-01-28T18:50:52Z")

</div>

probably mixing 1.9 and 2.0 files, `make clean` should get rid of any  
files not of the current branch, use that before using the env-setup  
script again.

---

<div class="post-metadata">

**Author:** ![marc.petrivelli](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/marc.petrivelli/32/3773_2.png) [@marc.petrivelli](https://forum.ansible.com/u/marc.petrivelli)\
**Post date:** [January 28, 2016, 6:57pm UTC](https://forum.ansible.com/t/run-from-source-hacking-script-broken/20372/3 "2016-01-28T18:57:59Z")

</div>

I did a ‘make clean’ and this doesn’t fix the issue. Again this a clean checkout into a new directory. I should have mentioned I do have 1.9.4 installed on my machine. Could that be causing the issue?

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [January 28, 2016, 7:08pm UTC](https://forum.ansible.com/t/run-from-source-hacking-script-broken/20372/4 "2016-01-28T19:08:28Z")

</div>

probably

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [January 28, 2016, 7:16pm UTC](https://forum.ansible.com/t/run-from-source-hacking-script-broken/20372/5 "2016-01-28T19:16:03Z")

</div>

We have seen some scenarios where easy\_install (and modules installed with easy\_install) created an easy-install.pth file that was causing the PYTHONPATH to get paths inserted in front of those created by the hacking script.

As such, it would end up importing files from other ansible installations.

After running the hacking script, if you run the following command, it should show you those search directories:

python -c ‘import sys; print sys.path’

If you see any site-packages, dist-packages, or maybe .egg paths before the ansible source directories, this is likely the cause.
