Error on installation of Frappe on Mac

Hi When I try to install Frappe on Mac using the info on this page Installation.

When I install frappe using pip3, its installing frappe 5.17.0, not 5.2.1 as mentioned in the instruction above.

When I try to create frappe bench its giving errors.

bench init frappe-bench

Setting Up Environment
$ python3 -m venv env
$ /Users/polyesther/frappe-bench/env/bin/python -m pip install --quiet --upgrade pip
$ /Users/polyesther/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 --depth 1 --origin upstream
Cloning into ‘frappe’…
remote: Enumerating objects: 3222, done.
remote: Counting objects: 100% (3222/3222), done.
remote: Compressing objects: 100% (2852/2852), done.
remote: Total 3222 (delta 421), reused 1735 (delta 269), pack-reused 0
Receiving objects: 100% (3222/3222), 17.19 MiB | 1.06 MiB/s, done.
Resolving deltas: 100% (421/421), done.
Installing frappe
$ /Users/polyesther/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /Users/polyesther/frappe-bench/apps/frappe
error: subprocess-exited-with-error

× Getting requirements to build editable did not run successfully.
│ exit code: 1
╰─> [17 lines of output]
Traceback (most recent call last):
File “/Users/polyesther/frappe-bench/env/lib/python3.7/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 353, in
main()
File “/Users/polyesther/frappe-bench/env/lib/python3.7/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/polyesther/frappe-bench/env/lib/python3.7/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 132, in get_requires_for_build_editable
return hook(config_settings)
File “/private/var/folders/72/dmrkl2pd70vg8qk2927y8gyr0000gn/T/pip-build-env-vl3v98gs/overlay/lib/python3.7/site-packages/flit_core/buildapi.py”, line 32, in get_requires_for_build_wheel
docstring, version = get_docstring_and_version_via_ast(module)
File “/private/var/folders/72/dmrkl2pd70vg8qk2927y8gyr0000gn/T/pip-build-env-vl3v98gs/overlay/lib/python3.7/site-packages/flit_core/common.py”, line 149, in get_docstring_and_version_via_ast
node = ast.parse(f.read())
File “/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ast.py”, line 35, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File “”, line 1110
if (key := can_cache_doc(args)) and (doc := cache.get_value(key)):
^
SyntaxError: invalid syntax
[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 editable 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/polyesther/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /Users/polyesther/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 “/usr/local/lib/python3.7/site-packages/bench/commands/make.py”, line 81, in init
verbose=verbose,
File “/usr/local/lib/python3.7/site-packages/bench/utils/render.py”, line 105, in wrapper_fn
return fn(*args, **kwargs)
File “/usr/local/lib/python3.7/site-packages/bench/utils/system.py”, line 85, in init
resolve_deps=False,
File “/usr/local/lib/python3.7/site-packages/bench/app.py”, line 444, in get_app
app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
File “/usr/local/lib/python3.7/site-packages/bench/utils/render.py”, line 126, in wrapper_fn
return fn(*args, **kwargs)
File “/usr/local/lib/python3.7/site-packages/bench/app.py”, line 249, in install
resolution=self.local_resolution,
File “/usr/local/lib/python3.7/site-packages/bench/app.py”, line 574, in install_app
f"{bench.python} -m pip install {quiet_flag} --upgrade -e {app_path} {cache_flag}"
File “/usr/local/lib/python3.7/site-packages/bench/bench.py”, line 48, in run
return exec_cmd(cmd, cwd=cwd or self.cwd, _raise=_raise)
File “/usr/local/lib/python3.7/site-packages/bench/utils/init.py”, line 158, in exec_cmd
raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: /Users/polyesther/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /Users/polyesther/frappe-bench/apps/frappe

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