Forums

Program will not run as task, says import erro

hello,

Trying to run ezgmail in a daily task, but the notes when the task attempts to run says no module is installed when I can run it manually in pythonanywhere. I have tried to pip install it again but it says the requirement already satisfied.

Any help with this?

Your Scheduled Task could be running using another python version. Do you use a virtual environment? Or maybe you specify the python version using #! ?

I have the python version (python3.6 and then the path) specified in the title. Same with my other tasks.

Are you sure you're using exactly the same Python version when you run it manually? What command are you using to run it when you do that?

I typically just press run and it runs no problems, not sure what the version is or how to check. When I I added the shebang for 3.6 it said no module for ezgmail was installed.

I am going to remove python3.6 from the task list and see if that helps.

To install packages for python3.6 (not using virtual environment) run pip3.6 install some_package_name --user