title: Error after running mapper.py locally in terminal
body: <p>I have just started learning Hadoop. I tried to run a simple mapreduce job on it, but before that I tried to check it locally. But its returning error. Kindly suggest any solution to it. I am using Ubuntu 12.04 LTS.</p>
  
  <p>SO the code is written in gedit, and is ad follows.</p>
  
  <pre><code>import sys
  
     for line in sys.stdin:
  
     line = line.strip()
  
     words = line.split()
  
     for word in words:
  
         print '%s\t%s' %(word,1)
  </code></pre>
  
  <p>Then I write the below command in terminal to check if mapper is working fine</p>
  
  <pre><code>maitreyee@bharti-desktop:~$ echo "foo faa" | /home/maitreyee/Documents/mapper.py
  </code></pre>
  
  <p>and the terminal returns the following error:</p>
  
  <pre><code>/home/maitreyee/Documents/mapper.py: line 1: import: command not found
  /home/maitreyee/Documents/mapper.py: line 5: syntax error near unexpected token `line'
  /home/maitreyee/Documents/mapper.py: line 5: `line = line.strip()'
  </code></pre>