I have a python script that works great when I execute it manually through SSH. But when I set up a cronjob to run it, I get back this error every time.
ImportError: No module named django.core.management
I’ve tried setting up django via these two methods and got the same error message with each:
Have you tried indicating the full path to the module?
Maximum Cash Discount on any plan with MAXCASH
Bear with me, I’m a Python newb.
the import statement looks like this now:
from django.core.management import setup_environ
how would I change that to include the full path??
Thanks for you help, I just figured it out. I guess crontabs on dreamhost run without environment. I added this to the top of my script
import sys, os
per a comment I found on this Blog:
hope this helps someone!