Error: "ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?"

There is a bunch of people in my school coming across the same issue. This started happening about nearly a week ago.

Steps to reproduce:

  1. On the terminal type: python3 manage.py runserver
  2. Get the error
    ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?
    Unexpected behavior: step number 2
    Expected behavior: have an option to open the website on a new tab via port 8000

Work around:

  • Go to the terminal and reinstall requirements.txt
    “pip3 install -r requirements.txt”

Warning: You wanna keep an eye on the requirements file too, because along with this the issue being reported in this post, there is other issue. This one is with the requirements.txt. Every time I update the requirements (command line: “pip3 freeze > requirements.txt”) dozens of unwanted lines are added to the requirements.txt

My question are
1- Is there anything I can do to get rid off these issues?
OR
2- Are these issues with the error message and requirements.txt a problem with gitpod? If so, are these behaviors the new normal or this will get fixed in the future?

I am having the same exact issue, still trying to figure out why.