python模块安装-Redis模块

安装python的redis模块

两种系统的安装方法

Windows环境:

我本地python环境:Python2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58)

Windows环境:win10 64

 

 链接:https://pan.baidu.com/s/1kVmXAq7 密码:q0sn

将介质解压到python主目录

 

进入目录C:\Python27\redis-2.10.6

执行cmd命令:

python setup.py build

python setup.py install

 

安装完成!

Linux环境:

1.  将介质上传到Linux服务器

 链接:https://pan.baidu.com/s/1kVmXAq7 密码:q0sn

2.  解压介质:

tar -zxvf redis-2.10.6.tar.gz

3.  安装:

cd redis-2.10.6
python setup.py build
python setup.py install

 

OK,到此大功告成。

 

详细过程:

[root@sgm4 python]# cd redis-2.10.6/

[root@sgm4 redis-2.10.6]# ls

CHANGES  INSTALL  LICENSE MANIFEST.in  PKG-INFO  README.rst redis  redis.egg-info  setup.cfg setup.py  tests

[root@sgm4 redis-2.10.6]# python setup.py build

running build

running build_py

creating build

creating build/lib

creating build/lib/redis

copying redis/__init__.py -> build/lib/redis

copying redis/_compat.py -> build/lib/redis

copying redis/client.py -> build/lib/redis

copying redis/connection.py -> build/lib/redis

copying redis/exceptions.py -> build/lib/redis

copying redis/lock.py -> build/lib/redis

copying redis/sentinel.py -> build/lib/redis

copying redis/utils.py -> build/lib/redis

[root@sgm4 redis-2.10.6]# python setup.py install

running install

running bdist_egg

running egg_info

writing redis.egg-info/PKG-INFO

writing top-level names to redis.egg-info/top_level.txt

writing dependency_links toredis.egg-info/dependency_links.txt

reading manifest file 'redis.egg-info/SOURCES.txt'

reading manifest template 'MANIFEST.in'

warning: no previously-included files found matching'__pycache__'

warning: no previously-included files matching '*.pyc' foundunder directory 'tests'

writing manifest file 'redis.egg-info/SOURCES.txt'

installing library code to build/bdist.linux-x86_64/egg

running install_lib

running build_py

creating build/bdist.linux-x86_64

creating build/bdist.linux-x86_64/egg

creating build/bdist.linux-x86_64/egg/redis

copying build/lib/redis/__init__.py ->build/bdist.linux-x86_64/egg/redis

copying build/lib/redis/_compat.py ->build/bdist.linux-x86_64/egg/redis

copying build/lib/redis/client.py ->build/bdist.linux-x86_64/egg/redis

copying build/lib/redis/connection.py ->build/bdist.linux-x86_64/egg/redis

copying build/lib/redis/exceptions.py ->build/bdist.linux-x86_64/egg/redis

copying build/lib/redis/lock.py ->build/bdist.linux-x86_64/egg/redis

copying build/lib/redis/sentinel.py ->build/bdist.linux-x86_64/egg/redis

copying build/lib/redis/utils.py ->build/bdist.linux-x86_64/egg/redis

byte-compiling build/bdist.linux-x86_64/egg/redis/__init__.pyto __init__.pyc

byte-compiling build/bdist.linux-x86_64/egg/redis/_compat.pyto _compat.pyc

byte-compiling build/bdist.linux-x86_64/egg/redis/client.pyto client.pyc

byte-compiling build/bdist.linux-x86_64/egg/redis/connection.pyto connection.pyc

byte-compilingbuild/bdist.linux-x86_64/egg/redis/exceptions.py to exceptions.pyc

byte-compiling build/bdist.linux-x86_64/egg/redis/lock.py tolock.pyc

byte-compiling build/bdist.linux-x86_64/egg/redis/sentinel.pyto sentinel.pyc

byte-compiling build/bdist.linux-x86_64/egg/redis/utils.py toutils.pyc

creating build/bdist.linux-x86_64/egg/EGG-INFO

copying redis.egg-info/PKG-INFO ->build/bdist.linux-x86_64/egg/EGG-INFO

copying redis.egg-info/SOURCES.txt ->build/bdist.linux-x86_64/egg/EGG-INFO

copying redis.egg-info/dependency_links.txt ->build/bdist.linux-x86_64/egg/EGG-INFO

copying redis.egg-info/top_level.txt ->build/bdist.linux-x86_64/egg/EGG-INFO

zip_safe flag not set; analyzing archive contents...

creating dist

creating 'dist/redis-2.10.6-py2.7.egg' and adding'build/bdist.linux-x86_64/egg' to it

removing 'build/bdist.linux-x86_64/egg' (and everything underit)

Processing redis-2.10.6-py2.7.egg

Copying redis-2.10.6-py2.7.egg to/usr/lib/python2.7/site-packages

Adding redis 2.10.6 to easy-install.pth file

 

Installed/usr/lib/python2.7/site-packages/redis-2.10.6-py2.7.egg

Processing dependencies for redis==2.10.6

Finished processing dependencies for redis==2.10.6

[root@sgm4 redis-2.10.6]# python

Python 2.7.5 (default, Jun 17 2014, 18:11:42)

[GCC 4.8.2 20140120 (Red Hat 4.8.2-16)] on linux2

Type "help", "copyright","credits" or "license" for more information.

>>> import redis

>>> 

你可能感兴趣的:(linux系统相关,python,模块,python,redis)