python install redis client

install easy_install

python
from urllib import urlopen
data = urlopen('http://peak.telecommunity.com/dist/ez_setup.py')
open('ez_setup.py', 'wb').write(data.read())
exit()

python ez_setup.py


Install the python client
python -m easy_install redis


Installation failed, manually download
https://pypi.python.org/packages/source/r/redis/redis-2.8.0.tar.gz
python setup.py install


Test 1
import redis
client =  redis.StrictRedis(host='localhost', port=6379)
print client.ping()


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326518814&siteId=291194637