我打算为 Zookeeper 使用 Python kazoo 库。这里完全是关于 Python 的问题,而不是 zookeeper 我想这意味着如何正确使用 Python kazoo..
我对 python 完全陌生,所以我不知道如何开始以及如何使用 kazoo 与 zookeeper 连接。
这是我正在阅读的开始使用 kazoo for Zookeeper 的文档。
http://kazoo.readthedocs.org/en/latest/install.html
在那个 wiki 中,他们要求安装 kazoo。他们为此使用了一些 pip 命令?
pip 在这里做什么?我目前正在使用 Windows,所以我安装了 cygwin 和 python。我正在使用 Python 2.7.3
host@D-SJC-00542612 ~
$ python
Python 2.7.3 (default, Dec 18 2012, 13:50:09)
[GCC 4.5.3] on cygwin
现在我所做的是——我从上面的网站完全复制了这个命令——pip install kazoo
并在我的 cygwin 命令提示符下运行它。
host@D-SJC-00542612 ~
$ pip install kazoo
Downloading/unpacking kazoo
Running setup.py egg_info for package kazoo
warning: no previously-included files found matching '.gitignore'
warning: no previously-included files found matching '.travis.yml'
warning: no previously-included files found matching 'Makefile'
warning: no previously-included files found matching 'run_failure.py'
warning: no previously-included files matching '*' found under directory 'sw'
warning: no previously-included files matching '*pyc' found anywhere in distribution
warning: no previously-included files matching '*pyo' found anywhere in distribution
Downloading/unpacking zope.interface>=3.8.0 (from kazoo)
Running setup.py egg_info for package zope.interface
warning: no previously-included files matching '*.dll' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
Requirement already satisfied (use --upgrade to upgrade): distribute in c:\python27\lib\site-packages (from zope.interface>=3.8.0->kazoo)
Installing collected packages: kazoo, zope.interface
Running setup.py install for kazoo
warning: no previously-included files found matching '.gitignore'
warning: no previously-included files found matching '.travis.yml'
warning: no previously-included files found matching 'Makefile'
warning: no previously-included files found matching 'run_failure.py'
warning: no previously-included files matching '*' found under directory 'sw'
warning: no previously-included files matching '*pyc' found anywhere in distribution
warning: no previously-included files matching '*pyo' found anywhere in distribution
Running setup.py install for zope.interface
warning: no previously-included files matching '*.dll' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
building 'zope.interface._zope_interface_coptimizations' extension
********************************************************************************
WARNING:
An optional code optimization (C extension) could not be compiled.
Optimizations for this package will not be available!
()
Unable to find vcvarsall.bat
********************************************************************************
Skipping installation of C:\Python27\Lib\site-packages\zope\__init__.py (namespace package)
Installing C:\Python27\Lib\site-packages\zope.interface-4.0.5-py2.7-nspkg.pth
Successfully installed kazoo zope.interface
Cleaning up...
它安装正确吗?现在我可以开始用python编写代码来连接zookeeper了吗?
很抱歉问了所有这些愚蠢的问题,因为我没有任何 python 背景,所以在这里学习一点..
我猜这完全是关于 Python 的问题,而不是 zookeeper。