Mac os error during installation

`Kashifs-MacBook-Air:~ kashifbashir$ sudo python install.py --production
Password:
The directory ‘/Users/kashifbashir/Library/Caches/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
The directory ‘/Users/kashifbashir/Library/Caches/pip’ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Requirement already up-to-date: setuptools in ./Library/Python/2.7/lib/python/site-packages
Requirement already up-to-date: pip in /usr/local/lib/python2.7/site-packages
Requirement already up-to-date: six>=1.6.0 in ./Library/Python/2.7/lib/python/site-packages (from setuptools)
Requirement already up-to-date: packaging>=16.8 in ./Library/Python/2.7/lib/python/site-packages (from setuptools)
Requirement already up-to-date: appdirs>=1.4.0 in ./Library/Python/2.7/lib/python/site-packages (from setuptools)
Requirement already up-to-date: pyparsing in ./Library/Python/2.7/lib/python/site-packages (from packaging>=16.8->setuptools)
The directory ‘/Users/kashifbashir/Library/Caches/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
The directory ‘/Users/kashifbashir/Library/Caches/pip’ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Requirement already satisfied: ansible==2.0.2.0 in /usr/local/lib/python2.7/site-packages
Requirement already satisfied: paramiko in /usr/local/lib/python2.7/site-packages (from ansible==2.0.2.0)
Requirement already satisfied: jinja2 in /usr/local/lib/python2.7/site-packages (from ansible==2.0.2.0)
Requirement already satisfied: PyYAML in /usr/local/lib/python2.7/site-packages (from ansible==2.0.2.0)
Requirement already satisfied: setuptools in ./Library/Python/2.7/lib/python/site-packages (from ansible==2.0.2.0)
Requirement already satisfied: pycrypto>=2.6 in /usr/local/lib/python2.7/site-packages (from ansible==2.0.2.0)
Requirement already satisfied: cryptography>=1.1 in /usr/local/lib/python2.7/site-packages (from paramiko->ansible==2.0.2.0)
Requirement already satisfied: pyasn1>=0.1.7 in /usr/local/lib/python2.7/site-packages (from paramiko->ansible==2.0.2.0)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python2.7/site-packages (from jinja2->ansible==2.0.2.0)
Requirement already satisfied: six>=1.6.0 in ./Library/Python/2.7/lib/python/site-packages (from setuptools->ansible==2.0.2.0)
Requirement already satisfied: packaging>=16.8 in ./Library/Python/2.7/lib/python/site-packages (from setuptools->ansible==2.0.2.0)
Requirement already satisfied: appdirs>=1.4.0 in ./Library/Python/2.7/lib/python/site-packages (from setuptools->ansible==2.0.2.0)
Requirement already satisfied: idna>=2.1 in /usr/local/lib/python2.7/site-packages (from cryptography>=1.1->paramiko->ansible==2.0.2.0)
Requirement already satisfied: enum34 in /usr/local/lib/python2.7/site-packages (from cryptography>=1.1->paramiko->ansible==2.0.2.0)
Requirement already satisfied: ipaddress in /usr/local/lib/python2.7/site-packages (from cryptography>=1.1->paramiko->ansible==2.0.2.0)
Requirement already satisfied: cffi>=1.4.1 in /usr/local/lib/python2.7/site-packages (from cryptography>=1.1->paramiko->ansible==2.0.2.0)
Requirement already satisfied: asn1crypto>=0.21.0 in /usr/local/lib/python2.7/site-packages (from cryptography>=1.1->paramiko->ansible==2.0.2.0)
Requirement already satisfied: pyparsing in ./Library/Python/2.7/lib/python/site-packages (from packaging>=16.8->setuptools->ansible==2.0.2.0)
Requirement already satisfied: pycparser in /usr/local/lib/python2.7/site-packages (from cffi>=1.4.1->cryptography>=1.1->paramiko->ansible==2.0.2.0)
[WARNING]: Host file not found: /etc/ansible/hosts

[WARNING]: provided hosts list is empty, only localhost is available

PLAY [localhost] ***************************************************************

TASK [setup] *******************************************************************
ok: [localhost]

TASK [Create user] *************************************************************
fatal: [localhost]: FAILED! => {“changed”: false, “failed”: true, “msg”: “[Errno 2] No such file or directory: ‘/Users/frappe’”}

NO MORE HOSTS LEFT *************************************************************
to retry, use: --limit @develop/create_user.retry

PLAY RECAP *********************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=1

Traceback (most recent call last):
File “install.py”, line 355, in
install_bench(args)
File “install.py”, line 98, in install_bench
run_playbook(‘develop/create_user.yml’, extra_vars=extra_vars)
File “install.py”, line 301, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py”, line 186, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘develop/create_user.yml’, ‘-e’, ‘@/tmp/extra_vars.json’]’ returned non-zero exit status 2`

try this
sudo python install.py --develop

Hello I have the same Issue and “sudo python install.py --develop” didn’t work either.

have you deleted the directory which was created by python install.py --production before python install.py --develop

Try the following if that doesn’t help
python install.py --develop --user frappe
or try manual install