raek
2k
2019-05-20 20:10:44 작성 2019-05-20 20:13:09 수정됨
0
126

django + react(리액트) 연동 질문이요


안녕하세요 현재

django 랑 react랑 연동중인데..

ML_server_side_app_develop 이 django 환경?이고 (폴더 보시면 어디인지 압니다.)


VIP_web_app-feature-login_and_register 가

react 환경인데요



manage.py 가 있는 경로에서

python manage.py runserver 입력하면 다음 과 같은 에러가뜹니다..

(참고로 VIP_web_app-feature-login_and_register 에서 yarn start 하면 react 프론트앤드는 잘 보여집니다.)

이거 어떻게 해결 하면 좋을까요??


Traceback (most recent call last):

  File "manage.py", line 8, in <module>

    from django.core.management import execute_from_command_line

ModuleNotFoundError: No module named 'django'


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

  File "manage.py", line 14, in <module>

    ) from exc

ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?


참고로 

manage.py의 코드는 다음과 같습니다

#!/usr/bin/env python
import os
import sys

if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "vip_ml_server.settings")
    try:
        from django.core.management import execute_from_command_line
    except ImportError as exc:
        raise ImportError(
            "Couldn't import Django. Are you sure it's installed and "
            "available on your PYTHONPATH environment variable? Did you "
            "forget to activate a virtual environment?"
        ) from exc
    execute_from_command_line(sys.argv)


감사합니다.


0
0
  • 답변 0

  • 로그인을 하시면 답변을 등록할 수 있습니다.