Pyleus build发生import问题,pyleus通过thrift连接hbase
使用pyleus,在bolt中打算使用thrift连接hbase,因此有
from thrift import Thrift
from thrift.transport import TSocket
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol
from hbase import Hbase
from hbase.ttypes import *
由于有:
1、thrift-0.9.1.tar.gz(包含setup.py)
2、 requirements.txt中thrift
thrift的import正常,
但是在hbase import的时候,总是报ImportError: No module named hbase。这个该如何处理呢?
thrift有pip源。hbase能否也找到相应的文件呢?
具体错误信息如下:
[root@vm-kafka01]# pyleus --verbose build word_count/pyleus_topology.yaml
New python executable in /tmp/tmp9CgVsa/resources/pyleus_venv/bin/python
Installing setuptools, pip, wheel...done.
Collecting pyleus==0.2.2
Collecting msgpack-python (from pyleus==0.2.2)
Requirement already satisfied (use --upgrade to upgrade): argparse in /tmp/tmp9CgVsa/resources/pyleus_venv/lib/python2.6/site-packages (from pyleus==0.2.2)
Collecting virtualenv (from pyleus==0.2.2)
Collecting PyYAML (from pyleus==0.2.2)
DEPRECATION: Failed to find 'PyYAML' at http://172.17.18.61/simple/pyyaml/. It is suggested to upgrade your index to support normalized names as the name in /simple/{name}.
Installing collected packages: msgpack-python, virtualenv, PyYAML, pyleus
Successfully installed PyYAML-3.11 msgpack-python-0.4.2 pyleus-0.2.2 virtualenv-13.1.2
Processing /tmp/thrift
Installing collected packages: thrift
Running setup.py install for thrift
Successfully installed thrift-0.9.1
pyleus build: error: [VirtualenvError] Failed to execute Python module: word_count.log_results. Error: Traceback (most recent call last):
File "/usr/lib64/python2.6/runpy.py", line 122, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib64/python2.6/runpy.py", line 34, in _run_code
exec code in run_globals
File "/tmp/tmp9CgVsa/resources/word_count/log_results.py", line 7, in <module>
from hbase import Hbase
ImportError: No module named hbase
多谢~~