1. 安装文件:
https://pypi.python.org/pypi/setuptools 直接下载然后拷贝到python目录下同下面步骤
下载 ez_setup.py >>> from urllib.request import urlopen>>>data = urlopen('https://bootstrap.pypa.io/ez_setup.py')>>>open('ez_setup.py','wb').write(data.read())>>>exit()
2. 运行 ez_setup辅助模块
D:\python\python ez_setup.py
3. 下载 redis库
D:\python\python -m easy_install redis
4. 建立redis连接
import redisconn = (host = "127.0.0.1", port = 6379, password = 111111)conn.set('hello','world')conn.get('hello')