I am trying now to write a UDF in python.

I'm currently using 0.10.0 release. I have replaced the jython.jar with the standalone version as per https://issues.apache.org/jira/browse/PIG-2665

I end up indirectly importing "os" and hit the following error:

  File "/home/bsmedberg/jython-installed/Lib/os.py", line 118, in <module>
    raise ImportError, 'no os specific module found'
ImportError: no os specific module found

After a bit of debugging, this is apparently caused by sys.builtin_module_names not including 'posix' when running in the pig environment.

If I run `java -cp pig-0.10.0/lib/jython.jar org.python.util.jython` to get a python shell I can successfully `import os` and sys.builtin_module_names does include 'posix'.

Has anyone else experienced this before or have suggestions for how I can diagnose/fix this error?

--BDS

Reply via email to