I am in the process on getting started with python and have run into a problem using django 2.1 and python 3.7 that many other people seem to have had as well.
Below is my process for getting here:
started a virtual environment
started a django project
attempted to run:
python manage.py runserver
I consistently get the error : ModuleNotFoundError: No module named 'settings'
I've researched extensively to and came across a few solutions in the following SO questions, none of which were effective solutions for me. Has anyone come across this issue?
Any insight would be helpful. Thanks in advance.
EDIT: my manage.py file looks like this:
#!/usr/bin/env python import os import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mytodoapp.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise 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?"
) from exc
execute_from_command_line(sys.argv)
my file structure looks like :
mytodoapp
mytodoapp
>__init__.py >settings.py >urls.py >wsgi.py
manage.py