Bench setup requirements giving error

bench setup requirements --python
Traceback -
$ /datadisk/home/erpnext/webapps/mooFlow/frappe-bench/env/bin/python -m pip install --quiet --upgrade pip

Installing python dependencies for frappe
$ /datadisk/home/erpnext/webapps/mooFlow/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e ./apps/frappe
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [48 lines of output]
running egg_info
writing lib3/PyYAML.egg-info/PKG-INFO
writing dependency_links to lib3/PyYAML.egg-info/dependency_links.txt
writing top-level names to lib3/PyYAML.egg-info/top_level.txt
Traceback (most recent call last):
File “/datadisk/home/erpnext/webapps/mooFlow/frappe-bench/env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 353, in
main()
File “/datadisk/home/erpnext/webapps/mooFlow/frappe-bench/env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 335, in main
json_out[‘return_val’] = hook(**hook_input[‘kwargs’])
File “/datadisk/home/erpnext/webapps/mooFlow/frappe-bench/env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 118, in get_requires_for_build_wheel
return hook(config_settings)
File “/tmp/pip-build-env-adr77iym/overlay/lib/python3.10/site-packages/setuptools/build_meta.py”, line 332, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=)
File “/tmp/pip-build-env-adr77iym/overlay/lib/python3.10/site-packages/setuptools/build_meta.py”, line 302, in _get_build_requires
self.run_setup()
File “/tmp/pip-build-env-adr77iym/overlay/lib/python3.10/site-packages/setuptools/build_meta.py”, line 318, in run_setup
exec(code, locals())
File “”, line 271, in
File “/tmp/pip-build-env-adr77iym/overlay/lib/python3.10/site-packages/setuptools/init.py”, line 117, in setup
return distutils.core.setup(**attrs)
File “/tmp/pip-build-env-adr77iym/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py”, line 183, in setup
return run_commands(dist)
File “/tmp/pip-build-env-adr77iym/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py”, line 199, in run_commands
dist.run_commands()
File “/tmp/pip-build-env-adr77iym/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py”, line 954, in run_commands
self.run_command(cmd)
File “/tmp/pip-build-env-adr77iym/overlay/lib/python3.10/site-packages/setuptools/dist.py”, line 950, in run_command
super().run_command(command)
File “/tmp/pip-build-env-adr77iym/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py”, line 973, in run_command
cmd_obj.run()
File “/tmp/pip-build-env-adr77iym/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py”, line 311, in run
self.find_sources()
File “/tmp/pip-build-env-adr77iym/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py”, line 319, in find_sources
mm.run()
File “/tmp/pip-build-env-adr77iym/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py”, line 540, in run
self.add_defaults()
File “/tmp/pip-build-env-adr77iym/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py”, line 578, in add_defaults
sdist.add_defaults(self)
File “/tmp/pip-build-env-adr77iym/overlay/lib/python3.10/site-packages/setuptools/command/sdist.py”, line 108, in add_defaults
super().add_defaults()
File “/tmp/pip-build-env-adr77iym/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py”, line 238, in add_defaults
self._add_defaults_ext()
File “/tmp/pip-build-env-adr77iym/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py”, line 323, in _add_defaults_ext
self.filelist.extend(build_ext.get_source_files())
File “”, line 201, in get_source_files
File “/tmp/pip-build-env-adr77iym/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py”, line 107, in getattr
raise AttributeError(attr)
AttributeError: cython_sources
[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.
ERROR:
subprocess.CalledProcessError: Command ‘/datadisk/home/erpnext/webapps/mooFlow/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e ./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 “/datadisk/home/erpnext/webapps/mooFlow/bin/bench”, line 8, in
sys.exit(cli())
File “/datadisk/home/erpnext/webapps/mooFlow/bench-repo/bench/cli.py”, line 127, in cli
bench_command()
File “/datadisk/home/erpnext/webapps/mooFlow/lib/python3.10/site-packages/click/core.py”, line 1130, in call
return self.main(*args, **kwargs)
File “/datadisk/home/erpnext/webapps/mooFlow/lib/python3.10/site-packages/click/core.py”, line 1055, in main
rv = self.invoke(ctx)
File “/datadisk/home/erpnext/webapps/mooFlow/lib/python3.10/site-packages/click/core.py”, line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/datadisk/home/erpnext/webapps/mooFlow/lib/python3.10/site-packages/click/core.py”, line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/datadisk/home/erpnext/webapps/mooFlow/lib/python3.10/site-packages/click/core.py”, line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/datadisk/home/erpnext/webapps/mooFlow/lib/python3.10/site-packages/click/core.py”, line 760, in invoke
return __callback(*args, **kwargs)
File “/datadisk/home/erpnext/webapps/mooFlow/bench-repo/bench/commands/setup.py”, line 231, in setup_requirements
bench.setup.python(apps=apps)
File “/datadisk/home/erpnext/webapps/mooFlow/bench-repo/bench/bench.py”, line 480, in python
self.run(f"{self.bench.python} -m pip install {quiet_flag} --upgrade -e {app_path}")
File “/datadisk/home/erpnext/webapps/mooFlow/bench-repo/bench/bench.py”, line 48, in run
return exec_cmd(cmd, cwd=cwd or self.cwd, _raise=_raise)
File “/datadisk/home/erpnext/webapps/mooFlow/bench-repo/bench/utils/init.py”, line 158, in exec_cmd
raise CommandFailedError from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError
INFO: A newer version of bench is available: 5.16.2 → 5.22.9

Hi,

It may help to say the operating environment and the versions of Frappe and any apps.

Does: sudo pip3 install frappe-bench --upgrade complete without error?

What does pip -V return?

Yes - pip3 install frappe-bench --upgrade this is completed without errors. But bench setup requirements giving above errors

pip -V r
pip 24.2

May we know the operating environment and the versions of Frappe and any apps?

Is this happening on the first use of Frappe? If so, what installation method is being used?

apps versions.
erpnext 14.1.2
frappe 14.7.0

Frappe was installed almost a year ago. method to install - bench init from our own repo. Version - 14 code base is there in the repo.

Does bench update produce the same errors?

Able to resolve. pyYAML reducing version to 5.3.1