python 安装python-memcached and pylibmc两个模块

python-memcached and pylibmc两个模块.

需要在Django中使用Memcached时:

node2:/root#pip install python-memcached 
Requirement already satisfied: python-memcached in /usr/local/python27/lib/python2.7/site-packages
Requirement already satisfied: six>=1.4.0 in /usr/local/python27/lib/python2.7/site-packages (from python-memcached)

node2:/usr/local/python27/lib/python2.7/site-packages#ls
django                      kafka_python-1.3.5.dist-info  MySQL_python-1.2.5-py2.7.egg-info          OleFileIO_PL.pyc                 pytz-2017.2.dist-info        six-1.11.0.dist-info
Django-1.11.dist-info       memcache.py                   MySQL_python-1.2.5-py2.7-linux-x86_64.egg  PIL                              README                       six.py
easy-install.pth            memcache.pyc                  _mysql.so                                  Pillow-4.1.0.dist-info           redis                        six.pyc
image                       MySQLdb                       olefile                                    pip-9.0.1-py2.7.egg              redis-2.10.5.dist-info
image-1.5.5-py2.7.egg-info  _mysql_exceptions.py          olefile-0.44-py2.7.egg-info                python_memcached-1.59.dist-info  setuptools-33.1.1-py2.7.egg
kafka                       _mysql_exceptions.pyc         OleFileIO_PL.py                            pytz                             setuptools.pth
node2:/usr/local/python27/lib/python2.7/site-packages#python
Python 2.7.3 (default, Mar 30 2017, 20:15:12) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import memcache

>>> print memcache.__file__
memcache.pyc
>>> 


node2:/root/libmemcached-0.40# yum install libmemcached-devel

node2:/root/libmemcached-0.40#pip install pylibmc
Requirement already satisfied: pylibmc in /usr/local/python27/lib/python2.7/site-packages
node2:/root/libmemcached-0.40#

原文地址:https://www.cnblogs.com/hzcya1995/p/13349395.html