Question: i'm trying to schedule a task every 5 seconds, here what i did:

```
import schedule
import time
import tweepy 
from threading import Timer

def job():
  iGen = (i for i in range(1, 6))
  for i in iGen:

    i += 1
    mymessage = "My message here " + str(i)

    print(mymessage)

schedule.every(5).seconds.do(job)

while 1:                                
   schedule.run_pending()
   time.sleep(1)

```

but the result is:

```
My message here 2 ..after 5 secs
My message here 3
My message here 4
My message here 5
My message here 6
My message here 2 ..after 5 secs
My message here 3
My message here 4
My message here 5
My message here 6
My message here 2 ..after 5 secs
My message here 3
My message here 4
My message here 5
My message here 6

```

what i need is:

```
My message here 2 ..after 5 secs
My message here 3 ..after 5 secs 
My message here 4 ..after 5 secs
My message here 5 ..after 5 secs
My message here 6 ..after 5 secs

```

sorry for the newbie question, Thank you

Answer: 
When you do `pip install twisted`, you are installing Twisted *into* some Python environment, depending on which `python` executable you are invoking `pip` with. If you have a 2.7.5 environment and a 2.7.9 environment, `pip install` might be putting Twisted in a different place for each, depending on what other options you passed to `pip`. (You probably passed *some* other options to `pip install` because without privileges, by default, `pip install` will just fail. Did you do `sudo pip install` perhaps? Did you do `pip install` as an admin user into a homebrewed Python?)

The right way to do this is to only ever install Twisted into virtual environments. You can create a virtual environment with the `-p` option to `virtualenv`, which tells it which Python to use for that environment. Then, with the correct virtual environment active, you can `pip install twisted` and everything should work as you expect.
Thanks Glyph,

Finally I find following simple command could directly fix this problem, because Kivy use his own virtualenv environment, but I do appreciated your kindly help.

*kivy -m pip install twisted*

Best Wish to you,