我正試圖在mac上安裝pylibmc。
mac env is osx el capitan 10.11.2。我試過pip install pylibmc
。但我收到以下錯誤。無法安裝pylibmc pip
我已經安裝了下面的列表。
- 釀造安裝libmemcached
- 命令行工具
- 出口CFLAGS = -Qunused論點@shell
- 出口CPPFLAGS = -Qunused論點@shell
我怎樣才能安裝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
看來libmemcached沒有正確安裝 –