Preparations for earlier stages of Django Development: (1) django Development

Source: Internet
Author: User
Tags install django

Preparations for earlier stages of Django Development: (1) django Development

Language: python3.5

Tool: JetBrains PyCharm

Advantages of virtualenvwrapper:

1. Independent Application Development Environments

2. Environment upgrades do not affect other applications or the global python environment.

3. It can prevent package management confusion and version conflicts in the system.

1. Install virtualenvwrapper

Pip3 install virtualenvwrapper-win

2. Create a virtual environment

Mkvirtualenv testvir2

3. Check which libraries are installed in the current virtual environment.

Pip3 list -- format = columns

4. Install django

Pip3 install django

5. Install mysql

Pip3 intstall pymysql

Django reports no module MySQLdb under Python3.5

Solution:

Write the following code into the _ init _. py file of the entire project site (that is, in the same file as setting. py:

Import pymysqlpymysql. install_as_MySQLdb ()

Install the pymysql module in advance, which is equivalent to the MySQLdb module in Python2.

To solve the problem.

6. Exit the current Virtual Environment

Deactivate

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.