python 运行python manege.py runserver时报错:“no module named djangorestframework” 的解决方案
importerror:no module named djangorestframework
Django REST framework is a powerful and flexible toolkit that makes it easy to build Web APIs.
Some reasons you might want to use REST framework:
- The Web browseable API is a huge usability win for your developers.
- Authentication policies including OAuth1a and OAuth2 out of the box.
- Serialization that supports both ORM and non-ORM data sources.
- Customizable all the way down - just use regular function-based views if you don't need the more powerful features.
- Extensive documentation, and great community support.
- Used and trusted by large companies such as Mozilla and Eventbrite.
djangorestframework安装
https://pypi.python.org/pypi/djangorestframework/0.3.2
下载解压
python setup.py install
如果提示
ImportError: No module named setuptools
则按如下步骤:
http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz 下载
解压
tar zxvf setuptools-0.6c11.tar.gz
cd setuptools-0.6c11
python setup.py build
python setup.py install
再安装djangorestframework0.3.2
然后python setup.py install 就OK了