Skip to content
Advertisement

ImportError: No module named schedule

I have made a scheduled programme on the osx system and I am trying to run it in the background, I read a different question about it and it said that this should work in the terminal by using this command, I have also tried downloading the modules as a root, nothing changed:

JavaScript

But the terminal returns an error:

JavaScript

Why does this happen?

My code looks like this:

JavaScript

Running pip freeze returns

JavaScript

Results from pip -V and python -V

JavaScript

Advertisement

Answer

In your terminal run pip install schedule, your output message should be like Requirement already satisfied because you have it installed already, just that you are in a different venv.

Now, before Requirement already satisfied message you will find a path, copy that that path.

Now go to your main.py because that is where the error is found. Before import schedule you should import sys. E,g:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement