title: Python sudo cron job not working due to import module error
body: <p>I have a web <strong>scraper</strong> script which runs without any problem when I start via command line. I have created a crontab job to run this script periodically with:</p>
  <pre><code>sudo crontab -e
  </code></pre>
  <p>According to syslog message script started but there was no expected output, so I created a log file for stdout and stderr messages and there seems to be a problem with BeautifulSoup module import.</p>
  <pre><code>import BeautifulSoup
  ImportError: No module named bs4
  </code></pre>
  <p>Do you have any idea what might be the root cause and how I can solve it?</p>
  <p><strong>EDIT:</strong>
  My problem was related with my crontabs run by different user (root). So as suggested in the answer, when I changed it to own user, problem solved!</p>