Home Can't install pylibmc by pip
Reply: 2

Can't install pylibmc by pip

naohide
1#
naohide Published in 2016-01-13 11:10:36Z

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.

  • brew install libmemcached
  • Command Line Tools
  • export CFLAGS=-Qunused-arguments @shell
  • export CPPFLAGS=-Qunused-arguments @shell

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
Atul Jain
2#
Atul Jain Reply to 2016-01-13 11:19:02Z

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/"
X.C.
3#
X.C. Reply to 2016-01-13 11:31:38Z

Install dev package:

sudo apt-get install libmemcached-dev
sudo apt-get install zlib1g-dev

then install with pip the python package :

pip install pylibmc

Check documentation for requirements

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.305541 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO