Python Common error

Source: Internet
Author: User
Tags install django pip install django virtual environment

1,no module named Http_client

Code from: http://www.weiguda.com/blog/18/

Not tested in the virtual environment, installed directly in the current environment. Last run error.

Baidu found: http://blog.csdn.net/prince_jun/article/details/46290097

Knowing that the version of Django and Djangorestframework did not match the result

I installed djangorestframework with Pip install, and Django was previously installed.

Use ' django-admin.py--version ' query, version 1.6. The Internet is 1.7, reload test:

$ sudo pip uninstall Django
$ sudo pip install Django

$ django-admin.py--version
1.8.7

Re-run without error

Note: Later the query learned that the version of the Django REST framework that was downloaded by the machine is 3.3.1

$ python
Python 2.7.6 (default, June 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "Help", "copyright", "credits" or "license" for more information.
>>> Import Rest_framework
>>> Print rest_framework.__version__
3.3.1


2,importerror:no module named Rest_framework_swagger

FIX: $ sudo pip install Django-rest-swagger


3, copy code, error after operation: no such table:django_session

FIX: $ python manage.py syncdb

View Material: http://blog.csdn.net/cyrabbit/article/details/7607599

Python Common error

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.