Installing python couchbase SDK on Linux Machine

Hi,

I am trying to install the python SDK (couchbase) on a linux machine using pip. But I am getting this error:

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

I got this error before when trying to install the SDK on a windows machine. I got around it by manually downloading the .whl from https://pypi.org/project/couchbase/#files.

What is the fix for a linux machine?

Thank you,
Zack

Hi, there are some known issues with the installer on both Windows and Linux, many of which are fixed in 3.0.4, due soon.

You can install a prerelease of this as follows:

pip install couchbase==3.0.4b1

If this doesn’t work, please use

pip install couchbase==3.0.4b1 -v -v -v > build_log.txt 2&>1

And send the logs.

Many thanks,

Ellis

Hello Ellis,

I received the same error when trying to use 3.0.4b1. Log file is attached. Thank you.build_log.zip (64.8 KB)

Also, this is a Debian linux version 10.4. It is for an Azure Function application.

Hi again,

Good news. I reviewed the error log some more and noticed in the middle it said:

WARNING: The pip package is not available, falling back to EasyInstall for handling setup_requires/test_requires; this is deprecated and will be removed in a future version

CMake Error: CMake was unable to find a build program corresponding to “Unix Makefiles”. CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage

After some research I realized I had to install gcc and g++ via apt-get:

apt-get install gcc
apt-get install g++

I was then able to install couchbase using pip install couchbase. It installed successfully but I did receive one final error:

conan 1.28.1 requires six<=1.14.0,>=1.10.0, but you’ll have six 1.15.0 which is incompatible

So I just did: pip install six==1.14.0. I then re-installed couchbase and it installed successfully without any error/warnings.

Thank you.

1 Like

I also just realized this information is in the docs:

https://docs.couchbase.com/python-sdk/3.0/hello-world/start-using-sdk.html

:pensive:

1 Like

Glad you resolved this. 3.0.4b1 should resolve the issue with conan/six by the way - did it not?

Thanks,

Ellis