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