Django Rest Framework — no module named rest_framework

后端 未结 21 810
夕颜
夕颜 2021-02-01 00:23

I\'ve installed django rest framework using pip install djangorestframework yet I still get this error when I run \"python3 manage.py sycndb\":

21条回答
  •  鱼传尺愫
    2021-02-01 00:48

    When using a virtual environment like virtualenvwithout having django-rest-framework installed globally you might as well have the error. The solution would be:

    • activate the environment first with {{your environment name}}/bin/activate for Linux or {{your environment name}}/Scripts/activate for Windows

    • and then run the command again.

提交回复
热议问题