Answer the question
In order to leave comments, you need to log in
How to import modules installed in the environment when running python.py with Cron in virtualenv?
When Cron runs the python.py script in the virtualenv, the modules installed in the environment are not imported. Writes No module named ...
Through the terminal, under the environment, it is imported normally
. I suspect that cron is looking for globally (not in the environment).
Answer the question
In order to leave comments, you need to log in
In the crone, write like this:
source [path to the environment] && python [path to the script]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question