When Installing ERPnext face this error Please help me I was trying past of some day not installing ERPnext on Ubuntu 18.04

Continuing the discussion from Setup Failed: Could not start up: Error in setup:

TASK [bench : setup config] ****************************************************
task path: /tmp/.bench/bench/playbooks/roles/bench/tasks/main.yml:51
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c ‘echo ~root && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘( umask 77 && mkdir -p “echo /var/tmp”&& mkdir /var/tmp/ansible-tmp-1656942161.2208605-87645-137135761418076 && echo ansible-tmp-1656942161.2208605-87645-137135761418076=“echo /var/tmp/ansible-tmp-1656942161.2208605-87645-137135761418076” ) && sleep 0’
Using module file /usr/local/lib/python3.6/dist-packages/ansible/modules/commands/command.py
<127.0.0.1> PUT /home/frappe/.ansible/tmp/ansible-local-84278k9z1jael/tmp68opef2w TO /var/tmp/ansible-tmp-1656942161.2208605-87645-137135761418076/AnsiballZ_command.py
<127.0.0.1> EXEC /bin/sh -c ‘setfacl -m u:frappe:r-x /var/tmp/ansible-tmp-1656942161.2208605-87645-137135761418076/ /var/tmp/ansible-tmp-1656942161.2208605-87645-137135761418076/AnsiballZ_command.py && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘sudo -H -S -n -u frappe /bin/sh -c ‘"’“‘echo BECOME-SUCCESS-fmoligopwofrbyciyxjlfzhhobzkogol ; /usr/bin/python3 /var/tmp/ansible-tmp-1656942161.2208605-87645-137135761418076/AnsiballZ_command.py’”’“’ && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘rm -f -r /var/tmp/ansible-tmp-1656942161.2208605-87645-137135761418076/ > /dev/null 2>&1 && sleep 0’
fatal: [localhost]: FAILED! => {
“changed”: true,
“cmd”: [
“bench”,
“setup”,
“config”
],
“delta”: “0:00:00.764785”,
“end”: “2022-07-04 06:42:42.354404”,
“invocation”: {
“module_args”: {
“_raw_params”: “bench setup config”,
“_uses_shell”: false,
“argv”: null,
“chdir”: “/home/frappe/frappe-bench”,
“creates”: “/home/frappe/frappe-bench/sites/common_site_config.json”,
“executable”: null,
“removes”: null,
“stdin”: null,
“stdin_add_newline”: true,
“strip_empty_ends”: true,
“warn”: true
}
},
“msg”: “non-zero return code”,
“rc”: 1,
“start”: “2022-07-04 06:42:41.589619”,
“stderr”: “Traceback (most recent call last):\n File "/usr/local/bin/bench", line 33, in \n sys.exit(load_entry_point(‘frappe-bench’, ‘console_scripts’, ‘bench’)())\n File "/home/frappe/.bench/bench/cli.py", line 104, in cli\n if sys.argv[1] in Bench(".").apps:\n File "/home/frappe/.bench/bench/bench.py", line 66, in init\n self.apps = BenchApps(self)\n File "/home/frappe/.bench/bench/bench.py", line 172, in init\n self.initialize_apps()\n File "/home/frappe/.bench/bench/bench.py", line 274, in initialize_apps\n self.apps.remove("frappe")\nValueError: list.remove(x): x not in list”,
“stderr_lines”: [
“Traceback (most recent call last):”,
" File "/usr/local/bin/bench", line 33, in ”,
" sys.exit(load_entry_point(‘frappe-bench’, ‘console_scripts’, ‘bench’)())“,
" File "/home/frappe/.bench/bench/cli.py", line 104, in cli”,
" if sys.argv[1] in Bench(".").apps:“,
" File "/home/frappe/.bench/bench/bench.py", line 66, in init”,
" self.apps = BenchApps(self)“,
" File "/home/frappe/.bench/bench/bench.py", line 172, in init”,
" self.initialize_apps()“,
" File "/home/frappe/.bench/bench/bench.py", line 274, in initialize_apps”,
" self.apps.remove("frappe")",
“ValueError: list.remove(x): x not in list”
],
“stdout”: “WARN: bench is installed in editable mode!\n\nThis is not the recommended mode of installation for production. Instead, install the package from PyPI with: pip install frappe-bench\n\n/home/frappe/frappe-bench/env/bin/python: Error while finding module specification for ‘frappe.utils.bench_helper’ (ModuleNotFoundError: No module named ‘frappe’)”,
“stdout_lines”: [
“WARN: bench is installed in editable mode!”,
“”,
“This is not the recommended mode of installation for production. Instead, install the package from PyPI with: pip install frappe-bench”,
“”,
“/home/frappe/frappe-bench/env/bin/python: Error while finding module specification for ‘frappe.utils.bench_helper’ (ModuleNotFoundError: No module named ‘frappe’)”
]
}

PLAY RECAP *********************************************************************
localhost : ok=66 changed=16 unreachable=0 failed=1 skipped=64 rescued=0 ignored=0

Traceback (most recent call last):
File “install.py”, line 497, in
install_bench(args)
File “install.py”, line 278, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 413, in run_playbook
success = subprocess.check_call(args, cwd=playbooks_folder, stdout=log_stream, stderr=sys.stderr)
File “/usr/lib/python3.6/subprocess.py”, line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frappe’]’ returned non-zero exit status 2.

From the look of this, you may have missed part of a command somewhere, or you are running the command from a directory other than the one containing the frappe_bench directory.

There is not enough information here to really tell.

Did you do this by running the easy install script? (install.py)

BKM

Yes i have installing easy install script through

Ok…

The Easy Install script has not really been stable for quite a while. People have been successful maybe 15% to 20% of the time.

Try this other method instead. It has a higher success rate.

Hope this helps.

BKM

it’s been 100% success rate for me more than 20 times for both v13 and v14 on Ubuntu 20.04 and 22.04

Let’s Try after that will update you!!

Thanks for your suggestions…:slight_smile:

Thanks… It’s Working Perfectly fine I have installed successfully Ubuntu 20.04

File /home/frappe/.bench/bench/bench.py, line 281, in initialize_apps
Change to:

if "frappe" in self.apps:
    self.apps.remove("frappe")