I'm trying to install pylibmc on mac.
mac env is osx el capitan 10.11.2.
I tried pip install pylibmc
. but I received following error.
I already installed list below.
How can I install pylibmc??
Installing collected packages: pylibmc
Running setup.py install for pylibmc
Complete output from command /Users/username/.virtualenvs/django-proj/bin/python2.7 -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-goDKgm/pylibmc/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-wxC5F1-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/username/.virtualenvs/django-proj/bin/../include/site/python2.7/pylibmc:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.11-x86_64-2.7
creating build/lib.macosx-10.11-x86_64-2.7/pylibmc
copying pylibmc/__init__.py -> build/lib.macosx-10.11-x86_64-2.7/pylibmc
copying pylibmc/__main__.py -> build/lib.macosx-10.11-x86_64-2.7/pylibmc
copying pylibmc/client.py -> build/lib.macosx-10.11-x86_64-2.7/pylibmc
copying pylibmc/consts.py -> build/lib.macosx-10.11-x86_64-2.7/pylibmc
copying pylibmc/pools.py -> build/lib.macosx-10.11-x86_64-2.7/pylibmc
copying pylibmc/test.py -> build/lib.macosx-10.11-x86_64-2.7/pylibmc
running build_ext
building '_pylibmc' extension
creating build/temp.macosx-10.11-x86_64-2.7
clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DUSE_ZLIB -I/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _pylibmcmodule.c -o build/temp.macosx-10.11-x86_64-2.7/_pylibmcmodule.o -fno-strict-aliasing
In file included from _pylibmcmodule.c:34:
./_pylibmcmodule.h:42:10: fatal error: 'libmemcached/memcached.h' file not found
#include <libmemcached/memcached.h>
^
1 error generated.
error: command 'clang' failed with exit status 1
first you need to install
brew install libmemcached
than install python package by this command
pip install pylibmc --install-option="--with-libmemcached=/usr/local/Cellar/libmemcached/1.0.18/"