hanyucd / movieweb_python

:clapper: Django 搭建的一个视频网站
216 stars 99 forks source link

ImportError: No module named rest_framework #1

Open EE1437 opened 7 years ago

EE1437 commented 7 years ago

你好,运行开发服务器python manage.py runserver的时候报错了,能发一份pip list出来吗? ee@EE ~/movieweb_python-master/movieweb $ python manage.py runserver Unhandled exception in thread started by <function wrapper at 0x7f9d36958d70> Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/django/utils/autoreload.py", line 229, in wrapper fn(*args, kwargs) File "/usr/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 107, in inner_run autoreload.raise_last_exception() File "/usr/lib/python2.7/dist-packages/django/utils/autoreload.py", line 252, in raise_last_exception six.reraise(_exception) File "/usr/lib/python2.7/dist-packages/django/utils/autoreload.py", line 229, in wrapper fn(args, kwargs) File "/usr/lib/python2.7/dist-packages/django/init.py", line 18, in setup apps.populate(settings.INSTALLED_APPS) File "/usr/lib/python2.7/dist-packages/django/apps/registry.py", line 85, in populate app_config = AppConfig.create(entry) File "/usr/lib/python2.7/dist-packages/django/apps/config.py", line 86, in create module = import_module(entry) File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module import(name) ImportError: No module named rest_framework

hanyucd commented 7 years ago

这是没有模块: rest_framework,django-rest-swagger 需要 pip 安装: pip install djangorestframework pip install django-rest-swagger 我还用了 requests 模块,没有的话安装 pip install requests 基本上安装了这些,就能运行了。 你运行成功了,就通知一声。