Unable to install couchbase-python-client


#1

Hi,

I am trying to install pythonsdk for couch base and facing below error. Can you someone please help me with it?

C env setup:
➜ rpm -qa | grep couchbase

libcouchbase-devel-2.8.0-1.el7.centos.x86_64
libcouchbase2-bin-2.8.0-1.el7.centos.x86_64
couchbase-release-1.0-4.x86_64
libcouchbase2-libevent-2.8.0-1.el7.centos.x86_64
libcouchbase2-core-2.8.0-1.el7.centos.x86_64

Error:
➜ python setup.py install

running install
running bdist_egg
running egg_info
creating couchbase.egg-info
writing top-level names to couchbase.egg-info/top_level.txt
writing dependency_links to couchbase.egg-info/dependency_links.txt
writing couchbase.egg-info/PKG-INFO
writing manifest file ‘couchbase.egg-info/SOURCES.txt’
package init file ‘acouchbase/tests/init.py’ not found (or not a regular file)
package init file ‘acouchbase/py34only/init.py’ not found (or not a regular file)
reading manifest file ‘couchbase.egg-info/SOURCES.txt’
reading manifest template ‘MANIFEST.in’
warning: no previously-included files matching ‘’ found under directory ‘docs/build’
warning: no files found matching '
.py’ under directory ‘tests’
warning: no files found matching ‘*.sample’ under directory ‘tests’
warning: no files found matching ‘couchbase’
warning: no files found matching ‘libcouchbase.dll’
writing manifest file ‘couchbase.egg-info/SOURCES.txt’
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.linux-x86_64-3.5
creating build/lib.linux-x86_64-3.5/acouchbase
copying acouchbase/init.py -> build/lib.linux-x86_64-3.5/acouchbase
copying acouchbase/asyncio_iops.py -> build/lib.linux-x86_64-3.5/acouchbase
copying acouchbase/bucket.py -> build/lib.linux-x86_64-3.5/acouchbase
creating build/lib.linux-x86_64-3.5/couchbase
copying couchbase/init.py -> build/lib.linux-x86_64-3.5/couchbase
copying couchbase/_bootstrap.py -> build/lib.linux-x86_64-3.5/couchbase
copying couchbase/_ixmgmt.py -> build/lib.linux-x86_64-3.5/couchbase
copying couchbase/_logutil.py -> build/lib.linux-x86_64-3.5/couchbase
copying couchbase/_pyport.py -> build/lib.linux-x86_64-3.5/couchbase
copying couchbase/admin.py -> build/lib.linux-x86_64-3.5/couchbase
copying couchbase/auth_domain.py -> build/lib.linux-x86_64-3.5/couchbase
copying couchbase/bucket.py -> build/lib.linux-x86_64-3.5/couchbase
copying couchbase/bucketmanager.py -> build/lib.linux-x86_64-3.5/couchbase
copying couchbase/cbas.py -> build/lib.linux-x86_64-3.5/couchbase
copying couchbase/cluster.py -> build/lib.linux-x86_64-3.5/couchbase
copying couchbase/connection.py -> build/lib.linux-x86_64-3.5/couchbase
copying couchbase/connstr.py -> build/lib.linux-x86_64-3.5/couchbase
copying couchbase/crypto.py -> build/lib.linux-x86_64-3.5/couchbase
copying couchbase/deprecation.py -> build/lib.linux-x86_64-3.5/couchbase
copying couchbase/exceptions.py -> build/lib.linux-x86_64-3.5/couchbase
copying couchbase/experimental.py -> build/lib.linux-x86_64-3.5/couchbase
copying couchbase/fulltext.py -> build/lib.linux-x86_64-3.5/couchbase
copying couchbase/items.py -> build/lib.linux-x86_64-3.5/couchbase
copying couchbase/mockserver.py -> build/lib.linux-x86_64-3.5/couchbase
copying couchbase/mutation_state.py -> build/lib.linux-x86_64-3.5/couchbase
copying couchbase/n1ql.py -> build/lib.linux-x86_64-3.5/couchbase
copying couchbase/priv_constants.py -> build/lib.linux-x86_64-3.5/couchbase
copying couchbase/result.py -> build/lib.linux-x86_64-3.5/couchbase
copying couchbase/subdocument.py -> build/lib.linux-x86_64-3.5/couchbase
copying couchbase/transcoder.py -> build/lib.linux-x86_64-3.5/couchbase
copying couchbase/user_constants.py -> build/lib.linux-x86_64-3.5/couchbase
copying couchbase/_version.py -> build/lib.linux-x86_64-3.5/couchbase
creating build/lib.linux-x86_64-3.5/couchbase/views
copying couchbase/views/init.py -> build/lib.linux-x86_64-3.5/couchbase/views
copying couchbase/views/iterator.py -> build/lib.linux-x86_64-3.5/couchbase/views
copying couchbase/views/params.py -> build/lib.linux-x86_64-3.5/couchbase/views
creating build/lib.linux-x86_64-3.5/couchbase/iops
copying couchbase/iops/init.py -> build/lib.linux-x86_64-3.5/couchbase/iops
copying couchbase/iops/base.py -> build/lib.linux-x86_64-3.5/couchbase/iops
copying couchbase/iops/select.py -> build/lib.linux-x86_64-3.5/couchbase/iops
creating build/lib.linux-x86_64-3.5/couchbase/asynchronous
copying couchbase/asynchronous/init.py -> build/lib.linux-x86_64-3.5/couchbase/asynchronous
copying couchbase/asynchronous/async_bucket.py -> build/lib.linux-x86_64-3.5/couchbase/asynchronous
copying couchbase/asynchronous/bucket.py -> build/lib.linux-x86_64-3.5/couchbase/asynchronous
copying couchbase/asynchronous/events.py -> build/lib.linux-x86_64-3.5/couchbase/asynchronous
copying couchbase/asynchronous/fulltext.py -> build/lib.linux-x86_64-3.5/couchbase/asynchronous
copying couchbase/asynchronous/n1ql.py -> build/lib.linux-x86_64-3.5/couchbase/asynchronous
copying couchbase/asynchronous/rowsbase.py -> build/lib.linux-x86_64-3.5/couchbase/asynchronous
copying couchbase/asynchronous/view.py -> build/lib.linux-x86_64-3.5/couchbase/asynchronous
creating build/lib.linux-x86_64-3.5/couchbase/tests
copying couchbase/tests/init.py -> build/lib.linux-x86_64-3.5/couchbase/tests
copying couchbase/tests/base.py -> build/lib.linux-x86_64-3.5/couchbase/tests
copying couchbase/tests/importer.py -> build/lib.linux-x86_64-3.5/couchbase/tests
copying couchbase/tests/test_sync.py -> build/lib.linux-x86_64-3.5/couchbase/tests
creating build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/init.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/admin_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/append_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/arithmetic_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/badargs_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/cbas_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/cbftstrings_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/cluster_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/connection_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/connstr_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/crypto_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/datastructures_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/delete_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/design_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/diag_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/dupkeys_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/empty_key_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/encodings_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/endure_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/enh_err_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/excextra_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/flush_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/format_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/get_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/iops_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/itertypes_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/itmops_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/ixmgmt_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/lock_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/lockmode_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/misc_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/mutationtokens_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/n1ql_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/n1qlstrings_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/observe_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/pipeline_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/results_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/rget_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/set_converters_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/set_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/spatial_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/stats_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/subdoc_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/touch_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/tracing_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/transcoder_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/verinfo_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/view_iterator_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/view_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/viewstrings_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
copying couchbase/tests/cases/xattr_t.py -> build/lib.linux-x86_64-3.5/couchbase/tests/cases
creating build/lib.linux-x86_64-3.5/gcouchbase
copying gcouchbase/init.py -> build/lib.linux-x86_64-3.5/gcouchbase
copying gcouchbase/bucket.py -> build/lib.linux-x86_64-3.5/gcouchbase
copying gcouchbase/connection.py -> build/lib.linux-x86_64-3.5/gcouchbase
copying gcouchbase/gevent_bucket.py -> build/lib.linux-x86_64-3.5/gcouchbase
copying gcouchbase/iops_gevent0x.py -> build/lib.linux-x86_64-3.5/gcouchbase
copying gcouchbase/iops_gevent10.py -> build/lib.linux-x86_64-3.5/gcouchbase
creating build/lib.linux-x86_64-3.5/txcouchbase
copying txcouchbase/init.py -> build/lib.linux-x86_64-3.5/txcouchbase
copying txcouchbase/bucket.py -> build/lib.linux-x86_64-3.5/txcouchbase
copying txcouchbase/connection.py -> build/lib.linux-x86_64-3.5/txcouchbase
copying txcouchbase/iops.py -> build/lib.linux-x86_64-3.5/txcouchbase
copying txcouchbase/twisted_bucket.py -> build/lib.linux-x86_64-3.5/txcouchbase
creating build/lib.linux-x86_64-3.5/acouchbase/tests
copying acouchbase/tests/asyncio_tests.py -> build/lib.linux-x86_64-3.5/acouchbase/tests
copying acouchbase/tests/fixtures.py -> build/lib.linux-x86_64-3.5/acouchbase/tests
copying acouchbase/tests/py34only.py -> build/lib.linux-x86_64-3.5/acouchbase/tests
copying acouchbase/tests/py35only.py -> build/lib.linux-x86_64-3.5/acouchbase/tests
creating build/lib.linux-x86_64-3.5/acouchbase/py34only
copying acouchbase/py34only/iterator.py -> build/lib.linux-x86_64-3.5/acouchbase/py34only
running build_ext
building ‘couchbase._libcouchbase’ extension
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/src
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/etl/LVS/dmetldata11/scaas/anaconda3/include/python3.5m -c src/exceptions.c -o build/temp.linux-x86_64-3.5/src/exceptions.o
In file included from src/exceptions.c:17:0:
src/pycbc.h:212:33: fatal error: libcouchbase/crypto.h: No such file or directory
#include <libcouchbase/crypto.h>
^
compilation terminated.
error: command ‘gcc’ failed with exit status 1

Thanks


#2

Hi kpraveen,
Thanks for using our product. I have questions.
What is the version of centOS python and and Couchbase C client?
Base on the error, it is missing file libcouchbase/crypto.h and this file is in couchbase c client 2.9.0 as in the document in the this link http://docs.couchbase.com/sdk-api/couchbase-c-client-2.9.0/crypto_8h.html

Information of how to get the latest release of csdk is from this link https://docs.couchbase.com/c-sdk/2.10/relnotes-c-sdk.html
If you have more question, drop me a line at thuan at couchbase dot com
Thanks


#3

Thanks for pointing me to the right version of couchbase c client libraryies. It helped us.