python windows开发 linux部署_python 在WINDOS虚拟环境部署

#查看电脑的版本

C:\Users\lys>pip -V

pip 8.1.1 from e:\python\python3.5\lib\site-packages (python 3.5)

#安装

C:\Users\lys>pip install virtualenv

#创建

C:\Users\lys>virtualenv testvir

#进入

C:\Users\lys>cd testvir

C:\Users\lys\testvir>cd Scripts

C:\Users\lys\testvir\Scripts>activate.bat

(testvir) C:\Users\lys\testvir\Scripts>

#安装

C:\Users\lys\testvir\Scripts>pip install virtualenvwrapper-win

#创建

C:\Users\lys\testvir\Scripts>mkvirtualenv testvir2

#退出

(testvir2) C:\Users\lys\testvir\Scripts>deactivate

C:\Users\lys\testvir\Scripts>

#查看

C:\Users\lys\testvir\Scripts>workon

Pass a name to activate one of the following virtualenvs:

==============================================================================

testvir2

#进入指定虚拟环境

C:\Users\lys\testvir\Scripts>workon testvir2

(testvir2) C:\Users\lys\testvir\Scripts>

(testvir2) C:\Users\lys\testvir\Scripts>deactivate.bat

C:\Users\lys\testvir\Scripts>

#进入指定虚拟环境,安装django

C:\Users\lys>workon muke

(muke) C:\Users\lys>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>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值