Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

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


Copy link to this message
-
missing datetime module
Hi,

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
this?

My pig version is 0.10.0.

Thanks for your help.
- Lei
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB