From the django docs:
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.
在安装Memcached自身之后,您将需要安装一个缓存的Memcached绑定。有几个可用的python memcached绑定;最常见的两种是python-memcached和pylibmc。
The pylibmc docs have their own requirements:
pylibmc医生有他们自己的要求:
-libmemcached 0.32 or later (last test with 0.51)
-zlib (required for compression support)
-libsasl2 (required for authentication support)
So it seems to me that I need to do the following:
所以在我看来,我需要做以下的事情:
-install memcached
-install libmemcached
-install zlib
-install libsas12
-install pylibmc
How/where can I do this? I've been used to just pip installing whatever I need but I can't even tell which of these are python packages. Are these bundled together anywhere?
我该怎么做?我已经习惯了只安装pip,但是我甚至不知道这些包中哪些是python包。这些东西捆在一起有地方吗?
2 个解决方案
#1
87
Just do pip install python-memcached
and you should be good.
只需执行pip安装python-memcached,就可以了。
As for installing memcached itself, it depends on the platform you are on.
至于安装memcached本身,它取决于您所使用的平台。
- Windows - http://pureform.wordpress.com/2008/01/10/installing-memcache-on-windows-for-php/
- Windows——http://pureform.wordpress.com/2008/01/10/installing-memcache-on-windows-for-php/
- OS X -
brew install memcached
- OS X - brew安装memcached。
- Debian/Ubuntu -
sudo apt-get install memcached
- Debian/Ubuntu - sudo apt-get install memcached
On OS X/Linux, just run memcached
in the command line.
在OS X/Linux上,只需在命令行中运行memcached。
#2
22
Detailed explanation here http://ilian.i-n-i.org/caching-websites-with-django-and-memcached/
详细说明在http://ilian.i-n-i.org/caching-websites-with-django-and-memcached/
The link above includes explanations for how to install Memcached on Ubuntu, how to configure it as cache engine in your Django project and how to use it.
上面的链接包括如何在Ubuntu上安装Memcached、如何将它配置为Django项目中的缓存引擎以及如何使用它。
#1
87
Just do pip install python-memcached
and you should be good.
只需执行pip安装python-memcached,就可以了。
As for installing memcached itself, it depends on the platform you are on.
至于安装memcached本身,它取决于您所使用的平台。
- Windows - http://pureform.wordpress.com/2008/01/10/installing-memcache-on-windows-for-php/
- Windows——http://pureform.wordpress.com/2008/01/10/installing-memcache-on-windows-for-php/
- OS X -
brew install memcached
- OS X - brew安装memcached。
- Debian/Ubuntu -
sudo apt-get install memcached
- Debian/Ubuntu - sudo apt-get install memcached
On OS X/Linux, just run memcached
in the command line.
在OS X/Linux上,只需在命令行中运行memcached。
#2
22
Detailed explanation here http://ilian.i-n-i.org/caching-websites-with-django-and-memcached/
详细说明在http://ilian.i-n-i.org/caching-websites-with-django-and-memcached/
The link above includes explanations for how to install Memcached on Ubuntu, how to configure it as cache engine in your Django project and how to use it.
上面的链接包括如何在Ubuntu上安装Memcached、如何将它配置为Django项目中的缓存引擎以及如何使用它。