Install and use Django in Python virtual environment

Time:2020-8-18

You can click the command under the CMD window to install the virtual environment
pip install virtualenv
Install and use Django in Python virtual environment

Generally, when you download the package, you can use the domestic image source appropriately, which can effectively improve the speed of downloading.

Source image of Douban

https://pypi.douban.com/simple/
Install Django demo
pip install -i https://pypi.douban.com/simple/ django
Install and use Django in Python virtual environment

Create virtual environment

virtualenv djangotest-Name yourself
Install and use Django in Python virtual environment

A djangotest folder will be generated in disk C. The contents are as follows:
Install and use Django in Python virtual environment

In the CMD window, enter this folder into the scripts file
Run the virtual environment command to open the environment
activate.bat
Install and use Django in Python virtual environment
This proves that the environment is successful

Then use Python in the virtual environment
Install and use Django in Python virtual environment

Exit virtual environment
deactivate.bat
Install and use Django in Python virtual environment

Install Django

It is not easy to install with Douban source
pip install -i https://pypi.douban.com/simple/ django
Install and use Django in Python virtual environment

Install djangorest framework

pip install -i https://pypi.douban.com/simple/ djangorestframework
Install and use Django in Python virtual environment

Install markdown Django filter

pip install markdown django-filter
Install and use Django in Python virtual environment

It is more convenient to create Django project in pychar~~