If you are facing the libcouchbase issues, while installing couchbase library using
pip install couchbase
Follow the below step to install couchbase.
-
clone
python coucbase source file fromhttps://github.com/couchbase/couchbase-python-client.git
-
Download
libcouchbase
c-sdk binary files fromhttps://developer.couchbase.com/server/other-products/release-notes-archives/c-sdk
-
Update the
setup.py
file.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
couchbase
folder.python setup.py build_ext --inplace
-
If the u face the
.dll file misssing error
.Include
libcouchbase.dll
fromlibcouchbase
c-sdk binary files insidecouchbase
folder.C:\Users\vaisakh\Downloads\libcouchbase-{version}\lib
-
Now it will update the
couchbase
folder -
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 freez
u may not able to view couchbase listed in installed packages.But we can verify availability of couchbase by
import couchbase
command in python console.import site; site.getsitepackages()
Hello,
When I execute setup.py , I get the following error :
Could you please help me ?