I'm a newbie to python, I've installed Luigi-2.0.1 on my RHEL linux. Trying to run a sample program
import luigi
class MyTask(luigi.Task) :
param = luigi.Parameter(default=42)
def requires(self):
return SomeOtherTask(self.param)
def run(self):
f = self.output.open('w')
print >>f, 'hello world'
f.close()
def output(self):
return luigi.LocalTarget('/tmp/foo/bar-%s.txt' % self.param)
if __name__ == '__main__':
luigi.run()
Executed the following command
luigi --module maintask.py MyTask
I get the following error.
Traceback (most recent call last):
File "/usr/bin/luigi", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2655, in <module>
working_set.require(__requires__)
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 648, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 546, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: python-daemon<3.0
Upon investigating the web, I could not figure out why this happened. I have python 2.6. Is it that luigi is not compatible with 2.6 and only works for python 3.0 onwards?.
Appreciate any help