Thanks. Instead, I found a Python implementation of the erf function, so that'll be good for now.
http://stackoverflow.com/questions/457408/is-there-an-easily-available-implementation-of-erf-for-python On Wed, Jul 17, 2013 at 5:08 PM, Cheolsoo Park <[email protected]> wrote: > Hi Dexin, > > Unfortunately, Pig is on Jython 2.5, so you won't be able to use Python 2.7 > modules. > > A while back, someone posted a hack to get Jython 2.7-b1 working with Pig. > You might give it a try: > > http://search-hadoop.com/m/BnZs3MmH5y/jython+2.7&subj=informational+getting+jython+2+7+b1+to+work > > Thanks, > Cheolsoo > > > > > > On Wed, Jul 17, 2013 at 3:33 PM, Dexin Wang <[email protected]> wrote: > > > When I do Python UDF with Pig, how do we know which version of Python it > is > > using? Is it possible to use a specific version of Python? > > > > Specifically my problem is in my UDF, I need to use a function in math > > module math.erf() which is newly introduced in Python version 2.7. I have > > Python 2.7 installed on my machine and standalone Python program runs > fine > > but when I run it in Pig as Python UDF, I got this: > > > > AttributeError: type object 'org.python.modules.math' has no attribute > > 'erf' > > > > My guess is Jython is using some pre-2.7 version of Python? > > > > Thanks for your help! > > > > Dexin > > >
