//创建虚拟环境testvir
C:\Users\Lenovo>virtualenv testvirUsing base prefix 'd:\\anaconda3'
New python executable in C:\Users\Lenovo\testvir\Scripts\python.exe
Installing setuptools, pip, wheel...
done.//激活testvir环境
C:\Users\Lenovo\testvir\Scripts>activate.bat
(testvir) C:\Users\Lenovo\testvir\Scripts>//退出虚拟环境
(testvir) C:\Users\Lenovo\testvir\Scripts>deactivate.bat
C:\Users\Lenovo\testvir\Scripts>
2 virtualenvwrapper-win
2.1 virtualenvwrapper-win安装
pip install virtualenvwrapper-win
2.2 virtualenvwrapper-win基本命令
//创建并进入testvir2虚拟环境
C:\Users\Lenovo\testvir\Scripts>mkvirtualenv testvir2C:\Users\Lenovo\Envs is not a directory, creating
Using base prefix 'd:\\anaconda3'
New python executable in C:\Users\Lenovo\Envs\testvir2\Scripts\python.exe
Installing setuptools, pip, wheel...
done.//退出虚拟环境
(testvir2) C:\Users\Lenovo\testvir\Scripts>deactivate//查看虚拟环境
C:\Users\Lenovo\testvir\Scripts>workonPass a name to activate one of the following virtualenvs:
==============================================================================
testvir2//进入testvir2虚拟环境
C:\Users\Lenovo\testvir\Scripts>workon testvir2(testvir2) C:\Users\Lenovo\testvir\Scripts>