来自 django 文档:
After installing Memcached itself, you'll need to install a memcached binding. There are several python memcached bindings available; the two most common are python-memcached and pylibmc.
pylibmc 文档有自己的要求:
-libmemcached 0.32 or later (last test with 0.51)
-zlib (required for compression support)
-libsasl2 (required for authentication support)
所以在我看来,我需要做以下事情:
-install memcached
-install libmemcached
-install zlib
-install libsas12
-install pylibmc
如何/在哪里可以做到这一点?我已经习惯于 pip 安装我需要的任何东西,但我什至无法分辨其中哪些是 python 包。这些是捆绑在一起的吗?
最佳答案
只需执行 pip install python-memcached
就可以了。
至于自己安装memcached,就看你所在的平台了。
- Windows - http://pureform.wordpress.com/2008/01/10/installing-memcache-on-windows-for-php/
- OS X -
brew install memcached
- Debian/Ubuntu -
sudo apt-get install memcached
在 OS X/Linux 上,只需在命令行中运行 memcached
。
关于django - 为 django 项目安装 memcached,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7636108/