ImportError: No module named ansible.constants

Un-tar ansible from http://releases.ansible.com/ansible/

when typeing ansible -version from terminal got the below error

line 40, in

import ansible.constants as C

ImportError: No module named ansible.constants

If you’re not using pip or other package manger you have to setup your paths:

http://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#tarballs-of-tagged-releases

source ./hacking/env-setup

kind regards
Pshem

After source ./hacking/env-setup getting below error

line 40, in

from ansible.errors import AnsibleError, AnsibleOptionsError, AnsibleParserError

ImportError: No module named ansible.errors