1. Install VirtualEnvWrapper

Install the command, Windows system, run in the non-scripts directory

PIP install VirtualEnvWrapper-Win PIP uninstall VirtualEnvWrapper-Win

2. Configure the installation path of the virtual environment (power down and restart after completion) :

3. Operation of virtual environment:

Creating a virtual environment

mkvirtualenv virtualenv_name

Will automatically switch to the created virtual environment

Switch to a virtual environment

workon other_virtualenv_name

Exit the current virtual environment


Delete a virtual environment

rmvirtualenv virtualenv_name

List all virtual environments


Switch to the directory of the virtual environment


Specify the Python version when creating the virtual environment

When using MKVirtualEnv, you can specify a — Python argument to specify a specific Python path

mkvirtualenv –python==C:python37python.exe virtualenv_name

The PIP List lists the dependent packages of all the PIP installations in the current virtual environment

Workon checks the directory file inside the wrapper:

5. Install the toolkit in a virtual environment:

PIP install scrapy -i https://pypi.douban.com/simple (use the douban source)