Article directory
main command
pip install virtualenv #安装
python -m venv 文件目录 #创建
activate #启动
python manage.py runserver #启动django
1. Install the virtual machine module
pip install virtualenv
2. Create a virtual machine
The created virtual machine will use your local python environment to determine the version
# python -m venv 虚拟机文件目录名
#示例
python -m venv venv1 #创建完毕后,虚拟机位于venv1文件夹下
3. Start the virtual machine
First of all, you need to enter the [Scripts] folder in the python virtual machine environment, and then use
activate
command to start the virtual machine, and when the virtual machine file directory name appears on the right side of the DOS window, the virtual machine starts successfully. See the screenshot for details