If you are facing the libcouchbase issues, while installing couchbase library using
pip install couchbase
Follow the below step to install couchbase.
-
clonepython coucbase source file fromhttps://github.com/couchbase/couchbase-python-client.git -
Download
libcouchbasec-sdk binary files fromhttps://developer.couchbase.com/server/other-products/release-notes-archives/c-sdk -
Update the
setup.pyfile.Update the library_dirs & include_dirs location to the proper libcouchbase version
extoptions['library_dirs'] = [r'C:\Users\vaisakh\Downloads\libcouchbase-{version}\lib'] extoptions['include_dirs'] = [r'C:\Users\vaisakh\Downloads\libcouchbase-{version}\include')] -
Goto cloned python coucbase source code folder 'couchbase-python-client' and execute.
It will build header files(_libcouchbase.pyd and others) in
couchbasefolder.python setup.py build_ext --inplace -
If the u face the
.dll file misssing error.Include
libcouchbase.dllfromlibcouchbasec-sdk binary files insidecouchbasefolder.C:\Users\vaisakh\Downloads\libcouchbase-{version}\lib -
Now it will update the
couchbasefolder -
Copy this folder and paste it in the python(if virutal environment enabled, its) site-packages location
eg: C:\Users\vaisakh\AppData\Local\Continuum\Anaconda2\envs\envCaroami\Lib\site-packages
Note: use the python command to find the site-packages location
-
Using
pip freezu may not able to view couchbase listed in installed packages.But we can verify availability of couchbase by
import couchbasecommand in python console.import site; site.getsitepackages()
Hello,
When I execute setup.py , I get the following error :
Could you please help me ?