title: import external modules in spark python
body: <p>I have a EMR job with pyspark application. My Code includes some external packages and some files for look up. </p>
  
  <p>This is the hierarchy of file system when i tried the same in local box.</p>
  
  <pre><code>[1] Wordcount.py -&gt; spark file
  [2] Temp.py -&gt; external packages
  [3] files/
          -you have some files which will be used by temp.py 
  </code></pre>
  
  <p><strong>Further Details:</strong><br>
                 When I run the WorkCount.py it imports temp.py in it. The files folder contains some model files. The temp.py internally use those model files.In local box i kept all the code at one place and run the job, it worked fine there
  <br><strong>It works fine in localbox but failing when i run in cluster</strong></p>
  
  <pre><code>[1] No module temp found
  [2] No *** file does not exist
  </code></pre>
  
  <p>Can someone tell me how should i have to organize this in EMR cluster such that i can run this smoothly.</p>