title: Cron job not running with python import modules
body: <p>I need to run a cron job on a python script to generate basemap plots.</p>
  
  <ol>
  <li><p>The script by itself runs ok manually.</p></li>
  <li><p>A simple <code>print("Hello")</code> at the start of the program with the rest commented out also runs ok on cron with<br>
  <code>*/10 * * * * /usr/bin/python3 ~/PythonFiles/TestScript.py &gt; /dev/null 2&gt;&amp;1 &gt;&gt;log.txt</code></p></li>
  </ol>
  
  <p>I made the file an executable using <code>chmod +x</code> and added a shebang (<code>#!/home/usr/anaconda3/bin/python</code>) at the start of the program. I can monitor activity in the log file via a printed message at the start of the program too</p>
  
  <ol start="3">
  <li>When I come to run the "normal" program which includes modules (<code>urllib.request, datetime, matplotlib, basemap, pygrib, numpy, ...</code>), the script then stops outputting anything to log.txt</li>
  </ol>
  
  <p>So I suspect it is to do with modules and possibly their locations. I checked and they seem to have been installed in various places <code>(.../pkgs, .../conda-meta, .../site-packages</code>, etc...)</p>
  
  <p>First of all, is what I suspect correct?<br>
  Secondly, how do I fix it so that cron knows where to find all the libraries to run the job?</p>
  
  <p>Many thanks!</p>