Error when trying to install pylibmc on Mac OSX Lion
Asked Answered
T

4

18

I've tried pip and easy_install, but I keep getting the following error: error: command '/usr/bin/llvm-gcc' failed with exit status 1

I'm running OSX Lion and the install runs inside a virtualenv, with Python 2.7.2.

Thanks in advance.

Thaothapa answered 30/1, 2012 at 20:19 Comment(0)
H
20

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

Hexavalent answered 31/1, 2012 at 4:25 Comment(1)
With that I could install it but I could not import it. I downloaded it from github and installed with sudo python setup.py install --with-libmemcached=/opt/local/ That fixed the issueGranulose
C
34

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
Chromo answered 2/3, 2012 at 8:43 Comment(2)
I had libmemcached installed, but for some reason it was unlinked. Uninstalling and reinstalling libmemcached fixed the inability to install pylibmc.Augmentative
I installed using homebrew and the it was correctly linked, although pylibmc couldn't find it either way. So I had to point the directory when installing it by running sudo pip install pylibmc --install-option="--with-libmemcached=/usr/local/Cellar/libmemcached/1.0.18/"Democratize
H
20

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

Hexavalent answered 31/1, 2012 at 4:25 Comment(1)
With that I could install it but I could not import it. I downloaded it from github and installed with sudo python setup.py install --with-libmemcached=/opt/local/ That fixed the issueGranulose
S
3

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

Socalled answered 18/3, 2019 at 0:29 Comment(0)
T
1

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.

Tartu answered 3/2, 2018 at 9:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.