Error during Installing frappe phase

bench init failed, this is the output

Installing frappe
$ /home/bench/erpnext/env/bin/python -m pip install --upgrade -e /home/bench/erpnext/apps/frappe
Obtaining file:///home/bench/erpnext/apps/frappe
Installing build dependencies … done
Checking if build backend supports build_editable … done
Getting requirements to build editable … error
ERROR: Command errored out with exit status 1:
command: /home/bench/erpnext/env/bin/python /home/bench/erpnext/env/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_editable /tmp/tmpbgsado3z
cwd: /home/bench/erpnext/apps/frappe
Complete output (17 lines):
Traceback (most recent call last):
File “/home/bench/erpnext/env/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py”, line 363, in
main()
File “/home/bench/erpnext/env/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py”, line 345, in main
json_out[‘return_val’] = hook(**hook_input[‘kwargs’])
File “/home/bench/erpnext/env/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py”, line 144, in get_requires_for_build_editable
return hook(config_settings)
File “/tmp/pip-build-env-p89k745s/overlay/lib/python3.6/site-packages/flit_core/buildapi.py”, line 32, in get_requires_for_build_wheel
docstring, version = get_docstring_and_version_via_ast(module)
File “/tmp/pip-build-env-p89k745s/overlay/lib/python3.6/site-packages/flit_core/common.py”, line 149, in get_docstring_and_version_via_ast
node = ast.parse(f.read())
File “/usr/lib64/python3.6/ast.py”, line 35, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File “”, line 1081
if key := can_cache_doc(args):
^
SyntaxError: invalid syntax

WARNING: Discarding file:///home/bench/erpnext/apps/frappe. Command errored out with exit status 1: /home/bench/erpnext/env/bin/python /home/bench/erpnext/env/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_editable /tmp/tmpbgsado3z Check the logs for full command output.
ERROR: Command errored out with exit status 1: /home/bench/erpnext/env/bin/python /home/bench/erpnext/env/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_editable /tmp/tmpbgsado3z Check the logs for full command output.
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/bench/commands/make.py”, line 83, in init
verbose=verbose,
File “/usr/local/lib/python3.6/site-packages/bench/utils/render.py”, line 95, in wrapper_fn
return fn(*args, **kwargs)
File “/usr/local/lib/python3.6/site-packages/bench/utils/system.py”, line 85, in init
resolve_deps=False,
File “/usr/local/lib/python3.6/site-packages/bench/app.py”, line 433, in get_app
app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
File “/usr/local/lib/python3.6/site-packages/bench/utils/render.py”, line 110, in wrapper_fn
return fn(*args, **kwargs)
File “/usr/local/lib/python3.6/site-packages/bench/app.py”, line 239, in install
resolution=self.local_resolution
File “/usr/local/lib/python3.6/site-packages/bench/app.py”, line 553, in install_app
bench.run(f"{bench.python} -m pip install {quiet_flag} --upgrade -e {app_path} {cache_flag}")
File “/usr/local/lib/python3.6/site-packages/bench/bench.py”, line 47, in run
return exec_cmd(cmd, cwd=cwd or self.cwd)
File “/usr/local/lib/python3.6/site-packages/bench/utils/init.py”, line 153, in exec_cmd
raise CommandFailedError
bench.exceptions.CommandFailedError

ERROR: There was a problem while creating erpnext

I see the reason maby be the python version, I will try to upgrade it to python3.11

Right @Kevin_Richard,

ERPNext version 14 requires Python version 3.10+.

// Install Python
sudo apt-get install python3-dev python3.10-dev python3-setuptools python3-pip python3-distutils

// Install Python Virtual Environment
sudo apt-get install python3.10-venv

I hope this helps.
Thank You!

1 Like

Thanks, I have successfully installed it.