I just started a tutorial series on map reduce and Hadoop. The set up instructions call for using an IDE called Canopy with MRjob. I have installed both, and everything works. But... If Canopy is just a Python IDE couldn't i use anything in its place (e.g. intellij or Sublime Text)?
when i run the same python script in Sublime Text i get the following error:
Traceback (most recent call last):
File "../Rating-Counter.py", line 1, in <module> from mrjob.job import MRJob
ImportError: No module named mrjob.job
here is the script:
from mrjob.job import MRJob
class MRRatingCounter(MRJob):
def mapper(self, key, line):
(userID, movieID, rating, timestamp) = line.split('\t')
yield rating, 1
def reducer(self, rating, occurences):
yield rating, sum(occurences)
if __name__ == '__main__':
MRRatingCounter.run()
I just used pip install for the MRjob, is there somewhere i can do a custom install and put it in a place that Sublime Text can see it? i have multiple versions of python, could it be the case that pip installed MRjob for 2.7 and not 3.4?
Update: I have tried using pip3 install MRjob
with this error returning:
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/gj/h8lrdpmx7lg3bq2_9t9j5kbr0000gn/T/pip-build-le53azna/MRjob