Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
while True: error
#5
(Oct-04-2019, 03:59 PM)2wheelz4me Wrote: Requirement already satisfied: schedule in ./.local/lib/python2.7/site-packages (0.6.0)
Have you more than one Python installations on your computer?

Why would you use python 2.7 if it is going to be deprecated in less than three months???!!!

Please, check here: We have decided that January 1, 2020, will be the day that we sunset Python 2.

or here: Python 2.7 will retire in...

Error:
Traceback (most recent call last): File "/home/pi/mu_code/amazon_price_checker.py", line 3, in <module> import schedule ModuleNotFoundError: No module named 'schedule'
Have you tried python -V (sorry, not sure how it is in Linux) to see what version of python you have?

And then, have you tried schedule -V (sorry, not sure how it is in Linux) to see what version of schedule you have and where it is?

All the best,



MORE ON THIS ISSUE ...
I have just found another thread for a linux user having the same problem in here. The solution that some other user gave, and that seems to solve the problem is:

"According to these logs, i found that the PYTHONPATH is different in manual shell and systemd. I tried to add "/home/ubuntu/.local/lib/python3.5/site-packages" into /etc/profile but systemd logs show that it still can't found the path.
So I did a stupid thing, I added

sys.path.append("/home/ubuntu/.local/lib/python3.5/site-packages")
in my code, and it works..."

All the best,



EVEN SOME MORE ON THIS ISSUE ...
On the same site, and maybe more geared to your problem, as I think you have two versions of python installed is this question and answer.

All the best,
newbieAuggie2019

"That's been one of my mantras - focus and simplicity. Simple can be harder than complex: You have to work hard to get your thinking clean to make it simple. But it's worth it in the end because once you get there, you can move mountains."
Steve Jobs
Reply


Messages In This Thread
while True: error - by 2wheelz4me - Oct-03-2019, 09:22 PM
RE: while True: error - by Yoriz - Oct-03-2019, 10:56 PM
RE: while True: error - by 2wheelz4me - Oct-04-2019, 01:54 AM
RE: while True: error - by 2wheelz4me - Oct-04-2019, 03:59 PM
RE: while True: error - by newbieAuggie2019 - Oct-04-2019, 05:01 PM
RE: while True: error - by 2wheelz4me - Oct-04-2019, 05:45 PM
RE: while True: error - by newbieAuggie2019 - Oct-04-2019, 06:34 PM
RE: while True: error - by 2wheelz4me - Oct-04-2019, 07:58 PM
RE: while True: error - by newbieAuggie2019 - Oct-04-2019, 08:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  while True error Nickd12 2 2,103 Sep-13-2020, 06:29 AM
Last Post: Nickd12
  While True is a syntax error? Piethon 8 13,822 Jul-21-2019, 12:40 PM
Last Post: metulburr
  Returning True or False vs. True or None trevorkavanaugh 6 9,411 Apr-04-2019, 08:42 AM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020