Facing Error While Installation With Building wheel for cairocffi did not run successfully

|##
Installing of frappe bench is giving this issue

Followed this solution as well but that didn’t help #20904 (comment)

Output of bench version

5.16.4

`Installing frappe
$ /home/areeb/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/areeb/frappe-bench/apps/frappe
error: subprocess-exited-with-error

× Building wheel for cairocffi (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
Traceback (most recent call last):
File “/home/areeb/frappe-bench/env/bin/pip”, line 5, in
from pip._internal.cli.main import main
ModuleNotFoundError: No module named ‘pip’
Traceback (most recent call last):
File “/home/areeb/frappe-bench/env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 353, in
main()
File “/home/areeb/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 “/home/areeb/frappe-bench/env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File “/tmp/pip-install-94p5tktg/cairocffi_4d6720960bdc4982987942ebcdf9d720/utils/build.py”, line 30, in build_wheel
spec.loader.exec_module(module)
File “”, line 883, in exec_module
File “”, line 241, in _call_with_frames_removed
File “/tmp/pip-install-94p5tktg/cairocffi_4d6720960bdc4982987942ebcdf9d720/cairocffi/ffi_build.py”, line 29, in
ffi = FFI()
File “/tmp/pip-build-env-v_daftlu/overlay/lib/python3.10/site-packages/cffi/api.py”, line 48, in init
import _cffi_backend as backend
ImportError: /tmp/pip-build-env-v_daftlu/overlay/lib/python3.10/site-packages/_cffi_backend.cpython-310-x86_64-linux-gnu.so: failed to map segment from shared object
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for cairocffi
ERROR: Could not build wheels for cairocffi, which is required to install pyproject.toml-based projects
subprocess.CalledProcessError: Command '/home/areeb/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/areeb/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 “/home/areeb/myenv/lib/python3.10/site-packages/bench/commands/make.py”, line 68, in init
init(
File “/home/areeb/myenv/lib/python3.10/site-packages/bench/utils/render.py”, line 105, in wrapper_fn
return fn(*args, **kwargs)
File “/home/areeb/myenv/lib/python3.10/site-packages/bench/utils/system.py”, line 79, in init
get_app(
File “/home/areeb/myenv/lib/python3.10/site-packages/bench/app.py”, line 444, in get_app
app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
File “/home/areeb/myenv/lib/python3.10/site-packages/bench/utils/render.py”, line 126, in wrapper_fn
return fn(*args, **kwargs)
File “/home/areeb/myenv/lib/python3.10/site-packages/bench/app.py”, line 242, in install
install_app(
File “/home/areeb/myenv/lib/python3.10/site-packages/bench/app.py”, line 573, in install_app
bench.run(
File “/home/areeb/myenv/lib/python3.10/site-packages/bench/bench.py”, line 48, in run
return exec_cmd(cmd, cwd=cwd or self.cwd, _raise=_raise)
File “/home/areeb/myenv/lib/python3.10/site-packages/bench/utils/init.py”, line 158, in exec_cmd
raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: /home/areeb/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/areeb/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”
`|

Hi @519_Hamza_Habeeb,

check the installation step.

Thank You!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.