I am attempting to install the python API as per the instructions here https://docs.couchbase.com/python-sdk/current/start-using-sdk.html. These suggest the package should have all dependencies included, but the output suggests this is not the case.
On windows (python 2.7)
C:\Python27>pip install couchbase
Collecting couchbase
Using cached https://files.pythonhosted.org/packages/e6/a4/a9f4a590abf00cd721d446a2096a1f366de2f2212bfd064dc8cc54ac7676/couchbase-2.5.4.tar.gz
Ignoring pip: markers '(sys_platform != "win32" and python_version >= "2.7") or python_version >= "3.0"' don't match your environment
Requirement already satisfied: typing in c:\python27\lib\site-packages (from couchbase)
Installing collected packages: couchbase
Running setup.py install for couchbase ... error
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\towler\\appdata\\local\\temp\\pip-build-vc0gyw\\couchbase\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\towler\appdata\local\temp\pip-qp_cff-record\install-record.txt --single-version-externally-managed --compile:
c:\users\towler\appdata\local\temp\pip-build-vc0gyw\couchbase\setup.py:111: UserWarning: I'm detecting you're running windows.You might want to modify the 'setup.py' script to use appropriate paths
warnings.warn("I'm detecting you're running windows."
running install
running build
running build_py
creating build\lib.win32-2.7
β¦
C:\Program Files (x86)\Common Files\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -D_CRT_SECURE_NO_WARNINGS=1 -Iβ¦\lcb-winbuild\x86\deps\include -Ic:\python27\include -Ic:\python27\PC /Tcsrc\exceptions.c /Fobuild\temp.win32-2.7\Release\src\exceptions.obj
exceptions.c
c:\users\towler\appdata\local\temp\pip-build-vc0gyw\couchbase\src\pycbc.h(193) : fatal error C1083: Cannot open include file: βlibcouchbase/couchbase.hβ: No such file or directory
error: command βC:\Program Files (x86)\Common Files\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exeβ failed with exit status 2
----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\towler\\appdata\\local\\temp\\pip-build-vc0gyw\\couchbase\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\towler\appdata\local\temp\pip-qp_cff-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\towler\appdata\local\temp\pip-build-vc0gyw\couchbase\
The experience on centos 7 is much the same
(couchbase)towler@buildlocal:~$ pip install couchbase
You are using pip version 7.1.0, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting couchbase
Downloading https://files.pythonhosted.org/packages/e6/a4/a9f4a590abf00cd721d446a2096a1f366de2f2212bfd064dc8cc54ac7676/couchbase-2.5.4.tar.gz (647kB)
100% |ββββββββββββββββββββββββββββββββ| 651kB 335kB/s
Collecting typing (from couchbase)
Downloading https://files.pythonhosted.org/packages/cc/3e/29f92b7aeda5b078c86d14f550bf85cff809042e3429ace7af6193c3bc9f/typing-3.6.6-py2-none-any.whl
Building wheels for collected packages: couchbase
Running setup.py bdist_wheel for couchbase
Complete output from command /home/towler/couchbase/bin/python2 -c "import setuptools;__file__='/tmp/pip-build-NBNCzG/couchbase/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpAdqvSfpip-wheel-:
running bdist_wheel
...
building 'couchbase._libcouchbase' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/opt/rh/python27/root/usr/include/python2.7 -c src/exceptions.c -o build/temp.linux-x86_64-2.7/src/exceptions.o
In file included from src/exceptions.c:17:0:
src/pycbc.h:193:10: fatal error: libcouchbase/couchbase.h: No such file or directory
#include <libcouchbase/couchbase.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/home/towler/couchbase/bin/python2 -c "import setuptools, tokenize;__file__='/tmp/pip-build-NBNCzG/couchbase/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-3PVDQT-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/towler/couchbase/include/site/python2.7/couchbase" failed with error code 1 in /tmp/pip-build-NBNCzG/couchbase