Ubuntu 14.04 installation traceback errors

Hi All,
Please help for installing,
I am trying to install ERPNext past 4 days.
Following are the errors I am getting please help.
TASK [bench : python3 bench init for develop] ***************************************************************************************************
fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: [“bench”, “init”, “/home/mushirahmed/frappe-bench”, “–frappe-branch”, “develop”, “–python”, “python3”], “delta”: “0:00:01.889489”, “end”: “2018-03-05 12:42:22.402662”, “failed”: true, “msg”: “non-zero return code”, “rc”: 1, “start”: “2018-03-05 12:42:20.513173”, “stderr”: “INFO:bench.utils:virtualenv -q env -p /usr/bin/python3\n/bin/sh: 1: virtualenv: not found\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/mushirahmed/.bench/bench/cli.py”, line 40, in cli\n bench_command()\n File “/home/mushirahmed/.local/lib/python2.7/site-packages/click/core.py”, line 722, in call\n return self.main(*args, **kwargs)\n File “/home/mushirahmed/.local/lib/python2.7/site-packages/click/core.py”, line 697, in main\n rv = self.invoke(ctx)\n File “/home/mushirahmed/.local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke\n return _process_result(sub_ctx.command.invoke(sub_ctx))\n File “/home/mushirahmed/.local/lib/python2.7/site-packages/click/core.py”, line 895, in invoke\n return ctx.invoke(self.callback, **ctx.params)\n File “/home/mushirahmed/.local/lib/python2.7/site-packages/click/core.py”, line 535, in invoke\n return callback(*args, **kwargs)\n File “/home/mushirahmed/.bench/bench/commands/make.py”, line 28, in init\n python \t\t = python)\n File “/home/mushirahmed/.bench/bench/utils.py”, line 57, in init\n setup_env(bench_path=path, python = python)\n File “/home/mushirahmed/.bench/bench/utils.py”, line 161, in setup_env\n exec_cmd(‘virtualenv -q {} -p {}’.format(‘env’, python), cwd=bench_path)\n File “/home/mushirahmed/.bench/bench/utils.py”, line 145, in exec_cmd\n raise CommandFailedError(cmd)\nbench.utils.CommandFailedError: virtualenv -q env -p /usr/bin/python3”, “stderr_lines”: [“INFO:bench.utils:virtualenv -q env -p /usr/bin/python3”, “/bin/sh: 1: virtualenv: not found”, “Traceback (most recent call last):”, " File “/usr/local/bin/bench”, line 11, in “, " load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()”, " File “/home/mushirahmed/.bench/bench/cli.py”, line 40, in cli", " bench_command()", " File “/home/mushirahmed/.local/lib/python2.7/site-packages/click/core.py”, line 722, in call", " return self.main(*args, **kwargs)", " File “/home/mushirahmed/.local/lib/python2.7/site-packages/click/core.py”, line 697, in main", " rv = self.invoke(ctx)", " File “/home/mushirahmed/.local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke", " return _process_result(sub_ctx.command.invoke(sub_ctx))", " File “/home/mushirahmed/.local/lib/python2.7/site-packages/click/core.py”, line 895, in invoke", " return ctx.invoke(self.callback, **ctx.params)", " File “/home/mushirahmed/.local/lib/python2.7/site-packages/click/core.py”, line 535, in invoke", " return callback(*args, **kwargs)", " File “/home/mushirahmed/.bench/bench/commands/make.py”, line 28, in init", " python \t\t = python)", " File “/home/mushirahmed/.bench/bench/utils.py”, line 57, in init", " setup_env(bench_path=path, python = python)", " File “/home/mushirahmed/.bench/bench/utils.py”, line 161, in setup_env", " exec_cmd(‘virtualenv -q {} -p {}’.format(‘env’, python), cwd=bench_path)", " File “/home/mushirahmed/.bench/bench/utils.py”, line 145, in exec_cmd", " raise CommandFailedError(cmd)", “bench.utils.CommandFailedError: virtualenv -q env -p /usr/bin/python3”], “stdout”: “”, “stdout_lines”: []}
to retry, use: --limit @/tmp/.bench/playbooks/site.retry

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

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

1 Like

Hey could you list all the commands you executed in the terminal on the fresh instance

Hi,
I have used following commands,

wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
sudo python install.py --develop --user mushirahmed

Now I am getting following error,

TASK [bench : create a new default site] ********************************************************************************************************
fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: [“bench”, “new-site”, “site1.local”, “–admin-password”, “iphone”, “–mariadb-root-password”, “iphone”], “delta”: “0:00:00.891607”, “end”: “2018-03-05 16:07:33.366294”, “failed”: true, “msg”: “non-zero return code”, “rc”: 1, “start”: “2018-03-05 16:07:32.474687”, “stderr”: “INFO:bench.utils:creating new site site1.local\nINFO:bench.utils:/home/mushirahmed/frappe-bench/env/bin/frappe site1.local --install 1bd3e0294d --root_password iphone --admin_password iphone\n/bin/sh: 1: /home/mushirahmed/frappe-bench/env/bin/frappe: not found\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/mushirahmed/.bench/bench/cli.py”, line 40, in cli\n bench_command()\n File “/home/mushirahmed/.local/lib/python2.7/site-packages/click/core.py”, line 722, in call\n return self.main(*args, **kwargs)\n File “/home/mushirahmed/.local/lib/python2.7/site-packages/click/core.py”, line 697, in main\n rv = self.invoke(ctx)\n File “/home/mushirahmed/.local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke\n return _process_result(sub_ctx.command.invoke(sub_ctx))\n File “/home/mushirahmed/.local/lib/python2.7/site-packages/click/core.py”, line 895, in invoke\n return ctx.invoke(self.callback, **ctx.params)\n File “/home/mushirahmed/.local/lib/python2.7/site-packages/click/core.py”, line 535, in invoke\n return callback(*args, **kwargs)\n File “/home/mushirahmed/.bench/bench/commands/make.py”, line 64, in new_site\n new_site(site, mariadb_root_password=mariadb_root_password, admin_password=admin_password)\n File “/home/mushirahmed/.bench/bench/utils.py”, line 195, in new_site\n ), cwd=os.path.join(bench_path, ‘sites’))\n File “/home/mushirahmed/.bench/bench/utils.py”, line 145, in exec_cmd\n raise CommandFailedError(cmd)\nbench.utils.CommandFailedError: /home/mushirahmed/frappe-bench/env/bin/frappe site1.local --install 1bd3e0294d --root_password iphone --admin_password iphone”, “stderr_lines”: [“INFO:bench.utils:creating new site site1.local”, “INFO:bench.utils:/home/mushirahmed/frappe-bench/env/bin/frappe site1.local --install 1bd3e0294d --root_password iphone --admin_password iphone”, “/bin/sh: 1: /home/mushirahmed/frappe-bench/env/bin/frappe: not found”, “Traceback (most recent call last):”, " File “/usr/local/bin/bench”, line 11, in “, " load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()”, " File “/home/mushirahmed/.bench/bench/cli.py”, line 40, in cli", " bench_command()", " File “/home/mushirahmed/.local/lib/python2.7/site-packages/click/core.py”, line 722, in call", " return self.main(*args, **kwargs)", " File “/home/mushirahmed/.local/lib/python2.7/site-packages/click/core.py”, line 697, in main", " rv = self.invoke(ctx)", " File “/home/mushirahmed/.local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke", " return _process_result(sub_ctx.command.invoke(sub_ctx))", " File “/home/mushirahmed/.local/lib/python2.7/site-packages/click/core.py”, line 895, in invoke", " return ctx.invoke(self.callback, **ctx.params)", " File “/home/mushirahmed/.local/lib/python2.7/site-packages/click/core.py”, line 535, in invoke", " return callback(*args, **kwargs)", " File “/home/mushirahmed/.bench/bench/commands/make.py”, line 64, in new_site", " new_site(site, mariadb_root_password=mariadb_root_password, admin_password=admin_password)", " File “/home/mushirahmed/.bench/bench/utils.py”, line 195, in new_site", " ), cwd=os.path.join(bench_path, ‘sites’))", " File “/home/mushirahmed/.bench/bench/utils.py”, line 145, in exec_cmd", " raise CommandFailedError(cmd)", “bench.utils.CommandFailedError: /home/mushirahmed/frappe-bench/env/bin/frappe site1.local --install 1bd3e0294d --root_password iphone --admin_password iphone”], “stdout”: “frappe app is not installed. Run the following command to install frappe\nbench get-app https://github.com/frappe/frappe.git”, “stdout_lines”: [“frappe app is not installed. Run the following command to install frappe”, “bench get-app https://github.com/frappe/frappe.git”]}
to retry, use: --limit @/tmp/.bench/playbooks/site.retry

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

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

Hey I wasn’t able to replicate the issue. Could you provide some more details, like

  1. the OS/Cloud you’re using
  2. are you executing the sudo python install.py --develop --user mushirahmed as root user or as someone else
  3. Any commands you executed before the wget command

Hii,
1.==> I am using Ubuntu 14.04 x86_64 GNU/Linux.
2.==> Yes I am executing the command mushirahmed as root user.
3.==> First I tried following commands
git clone https://github.com/frappe/bench bench-repo
pip install --user -e bench-repo
Above commands giving errors.
So I moved to Easy Install

Hi all,

I got the same issue like above when I execute the command, “sudo python install.py --develop --user frappe”.

My environment:

  • Ubuntu 16.04
  • Google Cloud (VM)

Please suggest me :slight_smile:

Hi,
Remove the frappe-bench repo and try it again.
Please check installation-frappe-env-bin-error-on-ubuntu-14-04

What errors were they ?

Hi,
which command you have use??