使用makemigration我是一個開發服務器上運行的工作和python3.5使用的virtualenv錯誤,而在Django
的Django 1.11,當我使用「蟒蛇manage.py makemigrations」我得到這個錯誤
Traceback (most recent call last): File "manage.py", line 8, in <module> from django.core.management import execute_from_command_line File "/opt/hafez_bot/env/lib/python3.5/site-packages/django/core/management/__init__.py", line 13, in <module> from django.core.management.base import ( File "/opt/hafez_bot/env/lib/python3.5/site-packages/django/core/management/base.py", line 17, in <module> from django.db.migrations.exceptions import MigrationSchemaMissing File "/opt/hafez_bot/env/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'
請幫我
我瞭解,這是關於我的「manage.py」文件,它與遷移無關。因爲「蟒蛇manage.py幫」引發同樣的錯誤
這是我的「PIP凍結」輸出:
certifi==2017.7.27.1
Django==1.11.6
djangorestframework==3.6.4
future==0.16.0
mysqlclient==1.3.12
python-telegram-bot==8.0
pytz==2017.2
您正在使用python 3.5 –
錯誤的env也許? –
@The_Cthulhu_Kid是的,我犯了一個錯誤。我正在使用python 3.5.2 –