Re: Importing module in Jython (HappyBase)

Joshua Staker <[email protected]> Fri, 18 Dec 2015 11:11:37 +0000 (UTC)
Newsgroups gmane.comp.lang.jython.user
Message-ID <[email protected]>
Yes, that was it! Thanks SO much. 

    On Thursday, December 17, 2015 7:17 PM, Jeff Emanuel <[email protected]> wrote:
 

  Maybe
 
 
 sys.path.append('/usr/local/lib/python2.7/dist-packages')
 
 
 On 12/17/2015 2:34 AM, Joshua Staker wrote:
  
  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 sys sys.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  
  
 ------------------------------------------------------------------------------
 
  
 _______________________________________________
Jython-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jython-users

------------------------------------------------------------------------------

_______________________________________________
Jython-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jython-users