Easy Install error: No module 'erpnext'

New Error for Easy Install : No module erpnext found.

<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /var/tmp/ansible-tmp-1602914459.3271024-192298315474589/ > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {
    "changed": true,
    "cmd": [
        "bench",
        "new-site",
        "erp.ileco1.ga",
        "--admin-password",
        "abc@12345",
        "--mariadb-root-password",
        "abc@12345"
    ],
    "delta": "0:00:02.435510",
    "end": "2020-10-17 08:01:02.030360",
    "invocation": {
        "module_args": {
            "_raw_params": "bench new-site erp.ileco1.ga --admin-password 'abc@12345' --mariadb-root-password 'abc@12345'",
            "_uses_shell": false,
            "argv": null,
            "chdir": "/home/erpfrappe/frappe-bench",
            "creates": null,
            "executable": null,
            "removes": null,
            "stdin": null,
            "stdin_add_newline": true,
            "strip_empty_ends": true,
            "warn": true
        }
    },
    "msg": "non-zero return code",
    "rc": 1,
    "start": "2020-10-17 08:00:59.594850",
    "stderr": "Traceback (most recent call last):\n  File \"/home/erpfrappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py\", line 68, in get_app_commands\n    app_command_module = importlib.import_module(app + '.commands')\n  File \"/usr/lib/python3.8/importlib/__init__.py\", line 127, in import_module\n    return _bootstrap._gcd_import(name[level:], package, level)\n  File \"<frozen importlib._bootstrap>\", line 1014, in _gcd_import\n  File \"<frozen importlib._bootstrap>\", line 991, in _find_and_load\n  File \"<frozen importlib._bootstrap>\", line 961, in _find_and_load_unlocked\n  File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed\n  File \"<frozen importlib._bootstrap>\", line 1014, in _gcd_import\n  File \"<frozen importlib._bootstrap>\", line 991, in _find_and_load\n  File \"<frozen importlib._bootstrap>\", line 973, in _find_and_load_unlocked\nModuleNotFoundError: No module named 'erpnext'\nTraceback (most recent call last):\n  File \"/usr/lib/python3.8/runpy.py\", line 194, in _run_module_as_main\n    return _run_code(code, main_globals, None,\n  File \"/usr/lib/python3.8/runpy.py\", line 87, in _run_code\n    exec(code, run_globals)\n  File \"/home/erpfrappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py\", line 99, in <module>\n    main()\n  File \"/home/erpfrappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py\", line 18, in main\n    click.Group(commands=commands)(prog_name='bench')\n  File \"/home/erpfrappe/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 764, in __call__\n    return self.main(*args, **kwargs)\n  File \"/home/erpfrappe/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 717, in main\n    rv = self.invoke(ctx)\n  File \"/home/erpfrappe/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 1137, in invoke\n    return _process_result(sub_ctx.command.invoke(sub_ctx))\n  File \"/home/erpfrappe/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 1137, in invoke\n    return _process_result(sub_ctx.command.invoke(sub_ctx))\n  File \"/home/erpfrappe/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 956, in invoke\n    return ctx.invoke(self.callback, **ctx.params)\n  File \"/home/erpfrappe/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 555, in invoke\n    return callback(*args, **kwargs)\n  File \"/home/erpfrappe/frappe-bench/apps/frappe/frappe/commands/site.py\", line 42, in new_site\n    frappe.init(site=site, new_site=True)\n  File \"/home/erpfrappe/frappe-bench/apps/frappe/frappe/__init__.py\", line 175, in init\n    setup_module_map()\n  File \"/home/erpfrappe/frappe-bench/apps/frappe/frappe/__init__.py\", line 1008, in setup_module_map\n    for module in get_module_list(app):\n  File \"/home/erpfrappe/frappe-bench/apps/frappe/frappe/__init__.py\", line 878, in get_module_list\n    return get_file_items(os.path.join(os.path.dirname(get_module(app_name).__file__), \"modules.txt\"))\n  File \"/home/erpfrappe/frappe-bench/apps/frappe/frappe/__init__.py\", line 836, in get_module\n    return importlib.import_module(modulename)\n  File \"/usr/lib/python3.8/importlib/__init__.py\", line 127, in import_module\n    return _bootstrap._gcd_import(name[level:], package, level)\n  File \"<frozen importlib._bootstrap>\", line 1014, in _gcd_import\n  File \"<frozen importlib._bootstrap>\", line 991, in _find_and_load\n  File \"<frozen importlib._bootstrap>\", line 973, in _find_and_load_unlocked\nModuleNotFoundError: No module named 'erpnext'",
    "stderr_lines": [
        "Traceback (most recent call last):",
        "  File \"/home/erpfrappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py\", line 68, in get_app_commands",
        "    app_command_module = importlib.import_module(app + '.commands')",
        "  File \"/usr/lib/python3.8/importlib/__init__.py\", line 127, in import_module",
        "    return _bootstrap._gcd_import(name[level:], package, level)",
        "  File \"<frozen importlib._bootstrap>\", line 1014, in _gcd_import",
        "  File \"<frozen importlib._bootstrap>\", line 991, in _find_and_load",
        "  File \"<frozen importlib._bootstrap>\", line 961, in _find_and_load_unlocked",
        "  File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed",
        "  File \"<frozen importlib._bootstrap>\", line 1014, in _gcd_import",
        "  File \"<frozen importlib._bootstrap>\", line 991, in _find_and_load",
        "  File \"<frozen importlib._bootstrap>\", line 973, in _find_and_load_unlocked",
        "ModuleNotFoundError: No module named 'erpnext'",
        "Traceback (most recent call last):",
        "  File \"/usr/lib/python3.8/runpy.py\", line 194, in _run_module_as_main",
        "    return _run_code(code, main_globals, None,",
        "  File \"/usr/lib/python3.8/runpy.py\", line 87, in _run_code",
        "    exec(code, run_globals)",
        "  File \"/home/erpfrappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py\", line 99, in <module>",
        "    main()",
        "  File \"/home/erpfrappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py\", line 18, in main",
        "    click.Group(commands=commands)(prog_name='bench')",
        "  File \"/home/erpfrappe/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 764, in __call__",
        "    return self.main(*args, **kwargs)",
        "  File \"/home/erpfrappe/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 717, in main",
        "    rv = self.invoke(ctx)",
        "  File \"/home/erpfrappe/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 1137, in invoke",
        "    return _process_result(sub_ctx.command.invoke(sub_ctx))",
        "  File \"/home/erpfrappe/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 1137, in invoke",
        "    return _process_result(sub_ctx.command.invoke(sub_ctx))",
        "  File \"/home/erpfrappe/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 956, in invoke",
        "    return ctx.invoke(self.callback, **ctx.params)",
        "  File \"/home/erpfrappe/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 555, in invoke",
        "    return callback(*args, **kwargs)",
        "  File \"/home/erpfrappe/frappe-bench/apps/frappe/frappe/commands/site.py\", line 42, in new_site",
        "    frappe.init(site=site, new_site=True)",
        "  File \"/home/erpfrappe/frappe-bench/apps/frappe/frappe/__init__.py\", line 175, in init",
        "    setup_module_map()",
        "  File \"/home/erpfrappe/frappe-bench/apps/frappe/frappe/__init__.py\", line 1008, in setup_module_map",
        "    for module in get_module_list(app):",
        "  File \"/home/erpfrappe/frappe-bench/apps/frappe/frappe/__init__.py\", line 878, in get_module_list",
        "    return get_file_items(os.path.join(os.path.dirname(get_module(app_name).__file__), \"modules.txt\"))",
        "  File \"/home/erpfrappe/frappe-bench/apps/frappe/frappe/__init__.py\", line 836, in get_module",
        "    return importlib.import_module(modulename)",
        "  File \"/usr/lib/python3.8/importlib/__init__.py\", line 127, in import_module",
        "    return _bootstrap._gcd_import(name[level:], package, level)",
        "  File \"<frozen importlib._bootstrap>\", line 1014, in _gcd_import",
        "  File \"<frozen importlib._bootstrap>\", line 991, in _find_and_load",
        "  File \"<frozen importlib._bootstrap>\", line 973, in _find_and_load_unlocked",
        "ModuleNotFoundError: No module named 'erpnext'"
    ],
    "stdout": "",
    "stdout_lines": []
}

PLAY RECAP *************************************************************************************************************
localhost                  : ok=77   changed=43   unreachable=0    failed=1    skipped=62   rescued=0    ignored=0

Traceback (most recent call last):
  File "install.py", line 472, in <module>
    install_bench(args)
  File "install.py", line 264, in install_bench
    run_playbook('site.yml', sudo=True, extra_vars=extra_vars)
  File "install.py", line 388, in run_playbook
    success = subprocess.check_call(args, cwd=playbooks_folder, stdout=log_stream, stderr=sys.stderr)
  File "/usr/lib/python3.8/subprocess.py", line 364, 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=erpfrappe']' returned non-zero exit status 2.

This thread has discussion relates to easy install on ubuntu 20.04 please review this thread may help.

Same Error reported in the last post of the thread

Easy install with --without-erpnext went through

The reason why erpnext app could not be installed is probably due to a bug in erpnext.

format_date should be formatdate.

I have requested a pull request for the bug fix I made
https://github.com/frappe/erpnext/pull/23678

@Joseph_Marie_Alba1 that’s great.
You have good sense of Erpnext
i could not catch up this, you did it.

I have installed manual on Ubuntu 20.04 by moved from those thread. I will share step.

Thanks. Actually my bug fix is incorrect because the format_date has been updated.
However, I wonder why the install process retrieved the old version, since it is a clean setup.

would this impact an “easy install” run of the script?