Pip install error

mac ver 10.9.4

cc -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -Qunused-arguments -I/Users/hanhokim/opt/include -arch x86_64 -arch i386 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/exceptions.c -o build/temp.macosx-10.9-intel-2.7/src/exceptions.o

In file included from src/exceptions.c:17:

src/pycbc.h:25:10: fatal error: ‘libcouchbase/couchbase.h’ file not found

#include <libcouchbase/couchbase.h>

     ^

1 error generated.

error: command ‘cc’ failed with exit status 1


Cleaning up…
Command /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c “import setuptools, tokenize;file=’/private/var/folders/b2/yh6fhnn12kz_k4cjwydcm_j00000gn/T/pip_build_hanhokim/couchbase/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(’\r\n’, ‘\n’), file, ‘exec’))” install --record /var/folders/b2/yh6fhnn12kz_k4cjwydcm_j00000gn/T/pip-8mV_1L-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/b2/yh6fhnn12kz_k4cjwydcm_j00000gn/T/pip_build_hanhokim/couchbase
Storing debug log for failure in /Users/hanhokim/Library/Logs/pip.log

Mac, I want to use Python and the couch base error as above.

Please let me know how to solve.

You need to install libcouchbase first. Simply do

brew install libcouchbase
and try pip again
4 Likes

Done that. But still getting errors.

In file included from src/exceptions.c:17:

src/pycbc.h:25:10: fatal error: ‘libcouchbase/couchbase.h’ file not found

#include <libcouchbase/couchbase.h>

     ^

1 error generated.

my libcouchbase in installed here: /usr/local/Cellar/libcouchbase/2.4.0/include/libcouchbase/couchbase.h

Apologies on the double post but the copy paste butchered my paste. Below is what worked.

Similar Mac version and config as mentioned above. Had to compile like so:

sudo python setup.py build_ext --inplace
–library-dir /usr/local/Cellar/libcouchbase/2.4.0_1/lib
–include-dir /usr/local/Cellar/libcouchbase/2.4.0_1/include

All better now. Hope it helps someone else.

Similar Mac version and config as mentioned above. Had to compile like so:

sudo python setup.py build_ext --inplace
–library-dir /usr/local/Cellar/libcouchbase/2.4.0_1
–include-dir /usr/local/Cellar/libcouchbase/2.4.0_1/include

All better now. Hope it helps someone else.

1 Like

@chuy08 - the setup.py your referring to are python setuptools?

@mnunberg the python SDK build seems to be failing: https://pypi.python.org/pypi/couchbase. do you have a version that works?

lifesaver! thank you!