Reputation: 2775
I'm running Django 2.2, python 3.6.7 and I'm working in a virtual environment on Ubuntu 18.04.
Having done a tutorial where the project "mysite" was built, I'm now doing another exercise to build an API. I'm using the same virtualenv. However when I migrate in my new project, call it tutorial
, I get ModuleNotFoundError: No module named 'mysite'
.
So I deleted mysite
. And I get the same error. And then I deleted the parent directory, recreated it (obviously not including mysite) and get the same error. I've searched recursively the codebase and the virtualenv and "mysite" does not turn up.
What's going on here?
Upvotes: 3
Views: 431
Reputation: 16763
You need to set DJANGO_SETTINGS_MODULE
/PYTHON_PATH
environment variables.
Upvotes: 1