Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig >> mail # user >> missing datetime module

Copy link to this message
missing datetime module

I have written a python udf which imports the datetime module.  However,
when I registered the python udf in pig, I encountered the following error:

2012-07-25 15:14:34,335 [main] ERROR org.apache.pig.tools.grunt.Grunt -
ERROR 1121: Python Error. Traceback (most recent call last):
  File "udf.py", line 8, in <module>
    from datetime import date
ImportError: No module named datetime

In the terminal, I can launch the jython interactive and import datetime
without any problem. Do I need to set any environment variables to solve

My pig version is 0.10.0.

Thanks for your help.
- Lei