Ansible 2.0 : stable-2.0 branch : cannot import name AnsibleOptionsError

Hello Ansible Geeks

I am willing to use ansible 2.0 and i have cloned ansible repository and source /hacking/env-setup and got this error.

Please see the details here : https://github.com/ansible/ansible/issues/13361

teeri:ansible ksingh$ ansible --version
Traceback (most recent call last):
  File "/Users/ksingh/ansible-2.0/ansible/bin/ansible", line 39, in <module>
    from ansible.errors import AnsibleError, AnsibleOptionsError, AnsibleParserError
ImportError: cannot import name AnsibleOptionsError
teeri:ansible ksingh$

Note : I am happily using ansible 1.9 on the same machine , and also wants ansible 2.0. OS – OSX

all of these are installed paramiko PyYAML Jinja2 httplib2 six

Many Thanks
Karan

it seems you might be loading mixed files from 1.9 and 2.0, make sure
you remove 1.9.

I have dealt with similar issues.
To see all the places Python might be loading ansible libraries use:
import sys
print (sys.path)

If you want to switch between Ansible versions, I have had the best luck with virtualenvs.

Virtualenv worked :slight_smile: