Python SDK install failed with PEP 517

I am using Ubuntu 18.04.4 LTS with virtualenv 16.0.0 and python 3.6.9.

and $ pip --version
pip 20.1.1 from /home/samgooi4189/functionize/couchbase-loadtest/couchbase_env/lib/python3.6/site-packages/pip (python 3.6)
Installed necessary packages needed according to

And additional couchbase lib:
apt list libcouchbase-dev Listing... Done libcouchbase-dev/bionic,now 2.10.6-1 amd64 [installed] apt list libcouchbase2-core
Listing… Done
libcouchbase2-core/bionic,now 2.10.6-1 amd64 [installed]
$ apt list libcouchbase2-bin
Listing… Done
libcouchbase2-bin/bionic,now 2.10.6-1 amd64 [installed]

I tried “pip install couchbase” and get error due to PEP517.
Then I tried “pip install --no-binary :all: couchbase”, get the same error again.

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


What can I do to resolve this issue?

Hi, was the output you sent from:

pip install couchbase -v

If not, please could you send that, or if so, an even more verbose version:

pip install couchbase -v -v -v




the log piped with

pip install couchbase -v -v -v

Hi, could you pipe stderr and stdout to the same file?
I’m interested in what happens between

  Building wheel for couchbase (PEP 517): started


  Building wheel for couchbase (PEP 517): finished with status 'error'

and I suspect that this output has been sent to another console stream.

You should be able to do this by running:

pip install couchbase -v -v -v > debug_allstd.log 2>&1



Hi, here is the log

Hi, thanks for the updated logs - I couldn’t identify anything obvious but there is quite a bit more detail.

I’ve been working on an installer with cut-down dependencies - perhaps this will help.

Can you install version 3.0.1? ( pip install couchbase==3.0.1 )

couchbase==3.0.1 works

Successfully built couchbase
Installing collected packages: typing, wrapt, typing-extensions, pyrsistent, attrs, mypy-extensions, couchbase
Successfully installed attrs-19.3.0 couchbase-3.0.1 mypy-extensions-0.4.3 pyrsistent-0.16.0 typing- typing-extensions- wrapt-1.12.1

Is this means latest couchbase Python SDK have issue?

Looks like it, have just made some fixes but doing further testing. You can try pip install couchbase==3.0.4b1 for a preview, though I’m doing some extra testing to ensure this works everywhere I can think of.

One further thing I’ve noticed is that older PIPs don’t necessary honour PEP517, so it may be necessary to upgrade your PIP/setuptools environment as follows:

pip install --upgrade pip setuptools wheel

Let me know how you get on.



I already run those to upgrade pip before installing couchbase SDK , so not related to PIP version

$ pip install --upgrade pip setuptools wheel
Requirement already up-to-date: pip in ./couchbase_env/lib/python3.6/site-packages (20.1.1)
Requirement already up-to-date: setuptools in ./couchbase_env/lib/python3.6/site-packages (49.2.0)
Requirement already up-to-date: wheel in ./couchbase_env/lib/python3.6/site-packages (0.34.2)

Thanks, what output did you get from the following?

pip install couchbase==3.0.4b1 -v -v -v

Successfully installed



Ah, great news - I plan to release this imminently as 3.0.4 - many thanks!

1 Like

Hi, I’m using Python 3.9.1 and pip 21.0.1

Error : “ERROR: Could not build wheels for couchbase which use PEP 517 and cannot be installed directly”

tried above steps still facing same issue


Hi @SANDESH_A_S - what OS are you on? Also, can you try installing w/ Python 3.8?

I am also getting the same error using below command:-
pip install couchbase==3.0.4b1 -v -v -v
pip install couchbase


Building wheel for couchbase (PEP 517) … error
ERROR: Failed building wheel for couchbase
Failed to build couchbase
ERROR: Could not build wheels for couchbase which use PEP 517 and cannot be installed directly

Please help .