Bench init fails, throws error

I am trying to setup a new Frappe project. I have installed the necessary dependencies and done the Mariadb config setup as well. But when I run bench init, it never succeeds

Setting Up Environment
$ python3 -m venv env
$ /Users/userxyz/dev/frappe_test/frappe-bench/env/bin/python -m pip install --quiet --upgrade pip
$ /Users/userxyz/dev/frappe_test/frappe-bench/env/bin/python -m pip install --quiet wheel
Getting frappe
$ git clone [GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript](https://github.com/frappe/frappe.git) --depth 1 --origin upstream
Cloning into ‘frappe’…
remote: Enumerating objects: 3320, done.
remote: Counting objects: 100% (3320/3320), done.
remote: Compressing objects: 100% (2866/2866), done.
remote: Total 3320 (delta 533), reused 1545 (delta 358), pack-reused 0 (from 0)
Receiving objects: 100% (3320/3320), 11.71 MiB | 5.14 MiB/s, done.
Resolving deltas: 100% (533/533), done.
Installing frappe
$ /Users/userxyz/dev/frappe_test/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /Users/userxyz/dev/frappe_test/frappe-bench/apps/frappe
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [21 lines of output]
Traceback (most recent call last):
File “/Users/userxyz/dev/frappe_test/frappe-bench/env/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 353, in
main()
~~~~^^
File “/Users/userxyz/dev/frappe_test/frappe-bench/env/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 335, in main
json_out[‘return_val’] = hook(**hook_input[‘kwargs’])
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File “/Users/userxyz/dev/frappe_test/frappe-bench/env/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 118, in get_requires_for_build_wheel
return hook(config_settings)
File “/private/var/folders/s1/_p73_m1s6c73yn39_l3d6w3w0000gn/T/pip-build-env-3kb6waqa/overlay/lib/python3.13/site-packages/setuptools/build_meta.py”, line 333, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/private/var/folders/s1/_p73_m1s6c73yn39_l3d6w3w0000gn/T/pip-build-env-3kb6waqa/overlay/lib/python3.13/site-packages/setuptools/build_meta.py”, line 303, in _get_build_requires
self.run_setup()
~~~~~~~~~~~~~~^^
File “/private/var/folders/s1/_p73_m1s6c73yn39_l3d6w3w0000gn/T/pip-build-env-3kb6waqa/overlay/lib/python3.13/site-packages/setuptools/build_meta.py”, line 319, in run_setup
exec(code, locals())
~~~~^^^^^^^^^^^^^^^^
File “”, line 33, in
File “”, line 27, in get_version
KeyError: ‘**version**’
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
subprocess.CalledProcessError: Command '/Users/userxyz/dev/frappe_test/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /Users/userxyz/dev/frappe_test/frappe-bench/apps/frappe ’ returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/bench/commands/make.py”, line 75, in init
init(
~~~~^
path,
^^^^^
…<12 lines>…
dev=dev,
^^^^^^^^
)
^
File “/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/bench/utils/render.py”, line 105, in wrapper_fn
return fn(*args, **kwargs)
File “/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/bench/utils/system.py”, line 87, in init
get_app(
~~~~~~~^
frappe_path,
^^^^^^^^^^^^
…<4 lines>…
resolve_deps=False,
^^^^^^^^^^^^^^^^^^^
)
^
File “/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/bench/app.py”, line 777, in get_app
app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/bench/utils/render.py”, line 126, in wrapper_fn
return fn(*args, **kwargs)
File “/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/bench/app.py”, line 254, in install
install_app(
~~~~~~~~~~~^
app=app_name,
^^^^^^^^^^^^^
…<6 lines>…
using_cached=using_cached,
^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File “/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/bench/app.py”, line 909, in install_app
bench.run(
~~~~~~~~~^
f"{bench.python} -m pip install {quiet_flag} --upgrade -e {app_path} {cache_flag}"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File “/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/bench/bench.py”, line 48, in run
return exec_cmd(cmd, cwd=cwd or self.cwd, _raise=_raise)
File “/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/bench/utils/**init**.py”, line 178, in exec_cmd
raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: /Users/userxyz/dev/frappe_test/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /Users/userxyz/dev/frappe_test/frappe-bench/apps/frappe

ERROR: There was a problem while creating frappe-bench
Do you want to rollback these changes? [y/N]: y
INFO: Rolling back Bench “frappe-bench”

What is going on here? What can I do to fix it? Also I am using Apple silicon Mac.

1 Like