ImportError at /users/
No module named http_client Request Method: GET Request URL: http://127.0.0.1:8000/users/?format=json Django Version: 1.6.1 Exception Type: ImportError Exception Value: No module named http_client
安装 pip install djangorestframework后按照网上部署rest_framework ,发现报这个错,后经过仔细研究(猜了半天)发现是django 版本和 djangorestframework 版本不符导致的错误解决办法:1. 安装 最新版本的django 和最新版本的 djangorestframework
2. 安装 django 1.6.1 和 djangoresetframework 2.4.5 测试没问题
本文详细介绍了在使用Django 1.6.1版本与Django Rest Framework 2.4.5版本部署REST API时遇到的ImportError问题,并提供了有效的解决方案。通过更新到最新版本的Django和Django Rest Framework,或使用指定版本,成功解决了错误。同时,分享了在部署过程中可能遇到的其他常见问题及解决方法。
4万+

被折叠的 条评论
为什么被折叠?



