Could not build wheels for couchbase which use PEP 517 and cannot be installed directly

I was following the online documentation to install python SDK and when i executed the “sudo -H python3 -m pip install couchbase” this command throw me the below error.
How should I fix this?
I am using python 3.9 for my project.

Building wheel for couchbase (pyproject.toml) … error
ERROR: Failed building wheel for couchbase
Failed to build couchbase
ERROR: Could not build wheels for couchbase, which is required to install pyproject.toml-based projects
Exception information:
Traceback (most recent call last):
File “/Users/kapilraj/.local/share/virtualenvs/customer-backend-XMYO8NLG/lib/python3.9/site-packages/pip/_internal/cli/base_command.py”, line 164, in exc_logging_wrapper
status = run_func(*args)
File “/Users/kapilraj/.local/share/virtualenvs/customer-backend-XMYO8NLG/lib/python3.9/site-packages/pip/_internal/cli/req_command.py”, line 204, in wrapper
return func(self, options, args)
File “/Users/kapilraj/.local/share/virtualenvs/customer-backend-XMYO8NLG/lib/python3.9/site-packages/pip/_internal/commands/install.py”, line 374, in run
raise InstallationError(
pip._internal.exceptions.InstallationError: Could not build wheels for couchbase, which is required to install pyproject.toml-based projects
WARNING: Ignoring invalid distribution -etuptools (/Users/kapilraj/.local/share/virtualenvs/customer-backend-XMYO8NLG/lib/python3.9/site-packages)
WARNING: Ignoring invalid distribution -etuptools (/Users/kapilraj/.local/share/virtualenvs/customer-backend-XMYO8NLG/lib/python3.9/site-packages)
Removed build tracker: ‘/private/var/folders/y1/pzqrdd9n34n_rtz3jpyfvpfw0000gn/T/pip-req-tracker-uezbzps9’

Hi @kapilraj - Do you know if you have a fairly recent version of Xcode installed (ideally >= v12.4)?

Also, can you try the following and provide the output. There will be a lot of text in the output log file. To reduce the size, search the log for the following text:

Building wheels for collected packages:

The content in the log file after that line is what is most useful.

sudo -H python3 -m pip install couchbase --no-cache --force-reinstall --log ./couchbase_install.txt