zhmg23

我们是如此的不同
资深运维工程师互荐群: 102123162

CentOS6.x下安装python的redis-py-cluster模块

python 要操作redis集群,需要安装redis-py-cluster模块

# pip install redis-py-cluster

Traceback (most recent call last):

  File "/usr/bin/pip", line 5, in <module>

    from pkg_resources import load_entry_point

  File "/usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 2607, in <module>

  File "/usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 565, in resolve

pkg_resources.DistributionNotFound: pip==1.5.5

但是在使用pip安装redis-py-cluster时,如上报错


升级pip

wget --no-check-certificate https://github.com/pypa/pip/archive/1.5.5.tar.gz

tar zvxf 1.5.5.tar.gz     

cd pip-1.5.5/

python setup.py install


在次进行安装

# pip install redis-py-cluster

Downloading/unpacking redis-py-cluster

  Downloading redis-py-cluster-1.3.1.tar.gz

  Running setup.py (path:/tmp/pip_build_root/redis-py-cluster/setup.py) egg_info for package redis-py-cluster

    

    warning: no previously-included files found matching '*.py'

    warning: no files found matching 'CHANGES'

Downloading/unpacking redis>=2.10.2 (from redis-py-cluster)

  Downloading redis-2.10.5-py2.py3-none-any.whl (60kB): 60kB downloaded

Installing collected packages: redis-py-cluster, redis

  Running setup.py install for redis-py-cluster

    

    warning: no files found matching 'CHANGES'

Successfully installed redis-py-cluster redis

Cleaning up...

顺利完成!

评论