python 在WINDOS虚拟环境部署

#查看电脑的版本
C:Userslys>pip -V
pip 8.1.1 from e:pythonpython3.5libsite-packages (python 3.5)
#安装
C:Userslys>pip install virtualenv
#创建
C:Userslys>virtualenv testvir
#进入
C:Userslys>cd testvir
C:Userslys	estvir>cd Scripts
C:Userslys	estvirScripts>activate.bat
(testvir) C:Userslys	estvirScripts>

#安装
C:Userslys	estvirScripts>pip install virtualenvwrapper-win
#创建
C:Userslys	estvirScripts>mkvirtualenv testvir2
#退出
(testvir2) C:Userslys	estvirScripts>deactivate
C:Userslys	estvirScripts>

#查看
C:Userslys	estvirScripts>workon
Pass a name to activate one of the following virtualenvs:
==============================================================================
testvir2
#进入指定虚拟环境
C:Userslys	estvirScripts>workon testvir2
(testvir2) C:Userslys	estvirScripts>
(testvir2) C:Userslys	estvirScripts>deactivate.bat
C:Userslys	estvirScripts>

#进入指定虚拟环境,安装django
C:Userslys>workon muke
(muke) C:Userslys>pip install django==1.9.8
Collecting django==1.9.8
  Downloading Django-1.9.8-py2.py3-none-any.whl (6.6MB)
    100% |████████████████████████████████| 6.6MB 76kB/s
Installing collected packages: django
Successfully installed django-1.9.8
################################################################
下载mysql-python 的安装包
http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python
D:Desktop>workon muke
(muke) D:Desktop>pip install MySQL_python-1.2.5-cp27-none-win_amd64.whl
(muke) D:Desktop>pip list
MySQL-python (1.2.5)
(muke) D:Desktop>
原文地址:https://www.cnblogs.com/liuyoushui/p/7263576.html