강의로 돌아가기
이경도

python manage.py migrate 오류가 납니다 ㅠ

(myvenv) C:\Users\admin\djangogirls\myvenv\Scripts>cd ../..

(myvenv) C:\Users\admin\djangogirls>python manage.py migrate
Traceback (most recent call last):
File manage.py, line 22, in
executefromcommandline(sys.argv)
File "C:\Users\admin\djangogirls\myvenv\lib\site-packages\django\core\management_
init.py, line 364, in execute_from_command_line
utility.execute()
File
C:\Users\admin\djangogirls\myvenv\lib\site-packages\django\core\management__init
.py, line 338, in execute
django.setup()
File
C:\Users\admin\djangogirls\myvenv\lib\site-packages\django_init.py", line 27, in setup
apps.populate(settings.INSTALLED
APPS)
File C:\Users\admin\djangogirls\myvenv\lib\site-packages\django\apps\registry.py, line 85, in populate
appconfig = AppConfig.create(entry)
File C:\Users\admin\djangogirls\myvenv\lib\site-packages\django\apps\config.py, line 94, in create
module = import
module(entry)
File C:\Users\admin\AppData\Local\Programs\Python\Python37\lib\importlib\__init__.py, line 127, in importmodule
return _bootstrap.
gcdimport(name[level:], package, level)
File "<frozen importlib.
bootstrap>, line 1006, in _gcd_import
File
, line 983, in _find_and_load
File
, line 967, in _find_and_load_unlocked
File
, line 677, in _load_unlocked
File
, line 728, in exec_module
File
, line 219, in _call_with_frames_removed
File
C:\Users\admin\djangogirls\myvenv\lib\site-packages\django\contrib\admin_init_.py, line 4, in
from django.contrib.admin.filters import (
File
C:\Users\admin\djangogirls\myvenv\lib\site-packages\django\contrib\admin\filters.py, line 10, in
from django.contrib.admin.options import IncorrectLookupParameters
File
C:\Users\admin\djangogirls\myvenv\lib\site-packages\django\contrib\admin\options.py, line 13, in
from django.contrib.admin import helpers, widgets
File
C:\Users\admin\djangogirls\myvenv\lib\site-packages\django\contrib\admin\widgets.py", line 152
'%s=%s' % (k, v) for k, v in params.items(),
^
SyntaxError: Generator expression must be parenthesized

이제 처음 시작하면서 따라하는데 처음부터 꼬이네요ㅠ

1 개의 답변
eunhye

저도 동일한 에러가 났었는데 장고와 파이썬 버전을 맞춰주니 해결되었어요.
저같은 경우는 파이썬 3.7을 사용하는데 장고 1.11버전을 설치했었는데 장고버전을 업그레이드 해주니 정상적으로
명령어가 구동되더라구요
https://docs.djangoproject.com/ko/2.0/faq/install/
여기서 파이썬과 장고 버전 한번 확인해보시면 좋을거같아요

답변 쓰기
이 입력폼은 마크다운 문법을 지원합니다. 마크다운 가이드 를 참고하세요.