|
From: Joshua S. <sni...@ya...> - 2015-12-17 09:35:52
|
Hi, I'm real new to Jython so excuse me if this is basic, but I have not been able to figure this out for the last 2 days. I am using HappyBase to interact with data in HBase. I installed HappyBase according to https://happybase.readthedocs.org/en/latest/installation.html and this is working fine with CPython. However I need it to work with Jython as this will eventually be used as a Python UDF in an Apache Pig script. However when I run 'import happybase' in Jython I get "ImportError: No module named happybase". It seems to me like I need to set an environment variable somewhere so Jython knows where to look for it, and I've tried adding the path to where I have the HappyBase __init__.py and other files to several variables but I keep getting the same error. I also tried adding the path to the sys.path in the code like below but that didn't do anything either. import syssys.path.append('/usr/local/lib/python2.7/dist-packages/happybase')import happybase It seems to me like something that should be easy to solve....is anyone able to point me in the right direction please? I'd really appreciate it! Josh |