Reputation:
When execute python manage.py makemigrations
or python manage.py migrate
I see the error message:
Traceback (most recent call last):
File "manage.py", line 8, in <module>
from django.core.management import execute_from_command_line
File "/home/ubuntu/mywasi-root/venv/lib/python3.5/site-packages/django/core/management/__init__.py", line 13, in <module>
from django.core.management.base import (
File "/home/ubuntu/mywasi-root/venv/lib/python3.5/site-packages/django/core/management/base.py", line 17, in <module>
from django.db.migrations.exceptions import MigrationSchemaMissing
File "/home/ubuntu/mywasi-root/venv/lib/python3.5/site-packages/django/db/migrations/__init__.py", line 1, in <module>
from .migration import Migration, swappable_dependency # NOQA
ImportError: No module named 'django.db.migrations.migration'
Why I see this error and how can I solve it?
Upvotes: 1
Views: 1053
Reputation:
Solution: reinstall Django.
Using pip3 uninstall django
and then pip3 install django
it works now!
Upvotes: 1