Problem in installation

i Have installed ubuntu 16.04 then simply run those commands

sudo apt-get update
sudo apt-get upgrade

sudo python --develop

it shows this error

The directory ‘/home/munim/.cache/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.

NB: I am new in ubuntu and also in erpnext


sudo -H python --develop


In addition to @yashodhan’s solution you also have an alternative way

It seems you are trying to install using non-privileged user(user without sudo rights). You will need to log in as root or Administrator and run the following command,

  • python --user (frappe or username) --develop

Hope this helps you :slight_smile:

1 Like

I have tried this

sudo -l
[sudo] password for munim:
Matching Defaults entries for munim on munim-Inspiron-5548:
env_reset, mail_badpass, secure_path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

User munim may run the following commands on munim-Inspiron-5548:

i have tried sudo -H python --develop
this error occurred

TASK [init bench] **************************************************************
[localhost]: FAILED! => {“changed”: true, “cmd”: [“bench”, “init”,
“/home/munim/frappe-bench”, “–frappe-branch”, “develop”], “delta”:
“0:05:34.250297”, “end”: “2016-09-22 11:49:49.147072”, “failed”: true,
“rc”: 1, “start”: “2016-09-22 11:44:14.896775”, “stderr”:
“ app frappe\nCloning into
‘frappe’…\ frappe\nCommand
"/home/munim/frappe-bench/env/bin/python -u -c "import setuptools,
tokenize;file=‘/tmp/pip-build-2nNUFp/python-ldap/’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(‘\r\n’, ‘\n’), file,
‘exec’))" install --record /tmp/pip-gDYDS1-record/install-record.txt
–single-version-externally-managed --compile --install-headers
/home/munim/frappe-bench/env/include/site/python2.7/python-ldap" failed
with error code 1 in /tmp/pip-build-2nNUFp/python-ldap/\nTraceback
(most recent call last):\n File "/usr/local/bin/bench", line 11, in
\n load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()\n File
"/home/munim/.bench/bench/", line 40, in cli\n
bench_command()\n File
"/usr/local/lib/python2.7/dist-packages/click/", line 716, in call\n return self.main(args,
**kwargs)\n File
"/usr/local/lib/python2.7/dist-packages/click/", line 696, in
main\n rv = self.invoke(ctx)\n File
"/usr/local/lib/python2.7/dist-packages/click/", line 1060, in
invoke\n return processresult(sub_ctx.command.invoke(sub_ctx))\n
File "/usr/local/lib/python2.7/dist-packages/click/", line
889, in invoke\n return ctx.invoke(self.callback, **ctx.params)\n
File "/usr/local/lib/python2.7/dist-packages/click/", line 534,
in invoke\n return callback(args, **kwargs)\n File
"/home/munim/.bench/bench/commands/", line 19, in init\n
verbose=verbose, clone_from=clone_from)\n File
"/home/munim/.bench/bench/", line 56, in init\n
get_app(frappe_path, branch=frappe_branch, bench_path=path,
build_asset_files=False, verbose=verbose)\n File
"/home/munim/.bench/bench/", line 73, in get_app\n
install_app(app=app_name, bench_path=bench_path, verbose=verbose)\n
File "/home/munim/.bench/bench/", line 103, in install_app\n
find_links=find_links))\n File "/home/munim/.bench/bench/",
line 127, in exec_cmd\n raise
/home/munim/frappe-bench/env/bin/pip install -q -e
/home/munim/frappe-bench/apps/frappe”, “stdout”: “Already using
interpreter /usr/bin/python\ninstalling frappe”, “stdout_lines”:
[“Already using interpreter /usr/bin/python”, “installing frappe”],
“warnings”: []}
to retry, use: --limit @develop/install.retry

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

Traceback (most recent call last):
File “”, line 342, in
File “”, line 108, in install_bench
run_playbook(‘develop/install.yml’, sudo=True, extra_vars=extra_vars)
File “”, line 292, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python2.7/”, line 541, in check_call
raise CalledProcessError(retcode, cmd)
Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘develop/install.yml’,
‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=munim’]’
returned non-zero exit status 2

Please install following before re-executing the script,

  • sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev

I had the same issue on 16.04.1 LTS and that solved it for me.
Two of the packages were already installed via the installation script, though (python-dev, libssl-dev).
libsasl2-dev & libldap2-dev were not installed and installing them was all that was needed.