djangoimporterrormysitemanage.py

manage.py runserver - ImportError: No module named MYSITE


I can't get the dev environment running!

I've been following the instructions here (tutorial on DjangoProject page). When I type

manage.py runserver

I get the following error:

ImportError: No module named MYSITE

I am executing the command within the folder MYSITE which has the files init.py, manage.py, settings.py, urls.py

I've searched around and found questions on "manage.py runserver", but not this specific error. Your help is greatly appreciated. Thanks


Solution

  • If you're using windows, you'll need to put your project's directory (the one with manage.py in it) into an environment variable called PYTHONPATH.