Error when trying to install pylibmc on Mac OSX Lion

First a question: is libmemcached installed? If not, install it and retry. It probably is but just in case....

If pylibmc still doesn't install the problem is probably that libmemcached is not installed in a directory where gcc can discover it (this was a macports symptom in my case), in which case you can store the location in the environment when running pip from the command line:

LIBMEMCACHED=/opt/local pip install pylibmc


it may caused by the libmemcached is not installed. You should install libevent & memcache & libmemcached first before you are trying install the pylibmc. If you are using homebrew, you can use it to finish the progress of install the dependency of the libmemcached. like this:

brew install libmemcached

Check if libmemcached is installed. If not found then install it with brew install libmemcached and rest of things will work just fine.

I resolved this issue while installing django test suite.


I tried all the above option with no luck. I then went to this site and followed the instructions (http://sendapatch.se/projects/pylibmc/install.html#requirements)

Basically do this:

pip install pylibmc --install-option="--with-libmemcached=/usr/local/"

and that is it.

I have a Mac with MacOS Mojave, python 3.6