Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: No module named rest_framework #1

Open
EE1437 opened this issue Jun 15, 2017 · 2 comments
Open

ImportError: No module named rest_framework #1

EE1437 opened this issue Jun 15, 2017 · 2 comments

Comments

@EE1437
Copy link

EE1437 commented Jun 15, 2017

你好,运行开发服务器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
Copy link
Owner

hanyucd commented Jun 16, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@hanyucd @EE1437 and others