virtualenv -- python虚拟沙盒

来源:互联网 发布:淘宝上如何卖闲置物品 编辑:程序博客网 时间:2024/06/11 01:16

1.安装:

[root@test40 local]# easy_install  virtualenv

2.配置

[root@test40 auto_import_card_info]# virtualenv auto_import_card_info_env
New python executable in auto_import_card_info_env/bin/python
Installing setuptools, pip, wheel...done.

3.启动

创建成功后,会在当前目录下生成对应的目录文件,进入目录,启动

[root@test40 auto_import_card_info_env]# source ./bin/activate

启动成功后,提示符后面会多出auto_import_card_info_env的字样,如下,

(auto_import_card_info_env)[root@test40 auto_import_card_info_env]# 

此时就可以在此环境中安装包了,

4.退出

(auto_import_card_info_env)[root@test40 auto_import_card_info_env]# deactivate


0 0