python – 无法通过pip安装pylibmc

python – 无法通过pip安装pylibmc,第1张

概述我正在尝试在mac上安装pylibmc. mac env是osx el capitan 10.11.2. 我试过pip install pylibmc.但是我收到了以下错误. 我已在下面安装了列表. > brew install libmemcached >命令行工具 >导出CFLAGS = -Qunused-arguments @shell > export CPPFLAGS = -Qunuse 我正在尝试在mac上安装pylibmc.
mac env是osx el cAPItan 10.11.2.

我试过pip install pylibmc.但是我收到了以下错误.

我已在下面安装了列表.

> brew install libmemcached
>命令行工具
>导出CFLAGS = -Qunused-arguments @shell
> export CPPFLAGS = -Qunused-arguments @shell

我怎样才能安装pylibmc?

Installing collected packages: pylibmcRunning setup.py install for pylibmcComplete 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 installrunning buildrunning build_pycreating buildcreating build/lib.macosx-10.11-x86_64-2.7creating build/lib.macosx-10.11-x86_64-2.7/pylibmccopying pylibmc/__init__.py -> build/lib.macosx-10.11-x86_64-2.7/pylibmccopying pylibmc/__main__.py -> build/lib.macosx-10.11-x86_64-2.7/pylibmccopying pylibmc/clIEnt.py -> build/lib.macosx-10.11-x86_64-2.7/pylibmccopying pylibmc/consts.py -> build/lib.macosx-10.11-x86_64-2.7/pylibmccopying pylibmc/pools.py -> build/lib.macosx-10.11-x86_64-2.7/pylibmccopying pylibmc/test.py -> build/lib.macosx-10.11-x86_64-2.7/pylibmcrunning build_extbuilding '_pylibmc' extensioncreating build/temp.macosx-10.11-x86_64-2.7clang -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-aliasingIn 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
解决方法 首先你需要安装

brew install libmemcached

比这个命令安装python包

pip install pylibmc --install-option="--with-libmemcached=/usr/local/Cellar/libmemcached/1.0.18/"
总结

以上是内存溢出为你收集整理的python – 无法通过pip安装pylibmc全部内容,希望文章能够帮你解决python – 无法通过pip安装pylibmc所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1195140.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-03
下一篇 2022-06-03

发表评论

登录后才能评论

评论列表(0条)

保存