Problem in installation

i Have installed ubuntu 16.04 then simply run those commands

sudo apt-get update
sudo apt-get upgrade

wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
sudo python install.py --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

Try

sudo -H python install.py --develop

@munim

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 install.py --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:
(ALL : ALL) ALL

i have tried sudo -H python install.py --develop
this error occurred

TASK [init bench] **************************************************************
fatal:
[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”:
“INFO:bench.app:getting app frappe\nCloning into
‘frappe’…\nINFO:bench.app:installing frappe\nCommand
"/home/munim/frappe-bench/env/bin/python -u -c "import setuptools,
tokenize;file=‘/tmp/pip-build-2nNUFp/python-ldap/setup.py’;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/cli.py", line 40, in cli\n
bench_command()\n File
"/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in call\n return self.main(args,
**kwargs)\n File
"/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in
main\n rv = self.invoke(ctx)\n File
"/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in
invoke\n return processresult(sub_ctx.command.invoke(sub_ctx))\n
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line
889, in invoke\n return ctx.invoke(self.callback, **ctx.params)\n
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534,
in invoke\n return callback(args, **kwargs)\n File
"/home/munim/.bench/bench/commands/make.py", line 19, in init\n
verbose=verbose, clone_from=clone_from)\n File
"/home/munim/.bench/bench/utils.py", 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/app.py", line 73, in get_app\n
install_app(app=app_name, bench_path=bench_path, verbose=verbose)\n
File "/home/munim/.bench/bench/app.py", line 103, in install_app\n
find_links=find_links))\n File "/home/munim/.bench/bench/utils.py",
line 127, in exec_cmd\n raise
CommandFailedError(cmd)\nbench.utils.CommandFailedError:
/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 “install.py”, line 342, in
install_bench(args)
File “install.py”, line 108, in install_bench
run_playbook(‘develop/install.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 292, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python2.7/subprocess.py”, line 541, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError:
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.
Thanks!