What is virtualenv
Virtualenv is used to create multiple standalone Python runtime environments on a single machine, enable isolation of third-party package dependencies between projects, and enable rapid copy deployment of the development environment to the production environment.
Installing Virtualenv
Command line execute easy_install virtualenv, or download the source package yourself for installation
Create a new environment
1. Command line execution virtualenv D:\Python-Test (establish python-test independent environment in D disk), in the establishment of an independent environment, will rely on the site packages in the system environment, if you want to completely do not rely on the system of packages, You need to add a parameter--no-site-packages
2. The directory structure of the newly created environment is as follows
Start stop new environment
1. The command line enters D:\Python-Test\Scripts and executes active to start the new environment. The command line will have a (python-test) identity at the front of the boot success
2. The command line enters D:\Python-Test\Scripts and executes deactive to stop the new environment
Install the package in a new environment
1. Command line to start the new environment
2. Online Installation: Enter D:\Python-Test\Scripts and perform pip install Package_name
3. Offline Installation: Unpack the package to a directory and enter the directory to execute the python setup.py install
This address: http://blog.csdn.net/fragmentalice/article/details/44833251
Configuring Python virtualenv in the window environment