# 什么是环境

• Include - 头文件所在位置
• Lib - 库文件所在位置
• Scripts - python应用所在位置
• tcl - 目前我还不知道
• 还有其他文件夹我也不知道了

# 为什么需要虚拟环境

The basic problem being addressed is one of dependencies and versions, and indirectly permissions. Imagine you have an application that needs version 1 of LibFoo, but another application requires version 2. How can you use both these applications? If you install everything into /usr/lib/python2.7/site-packages (or whatever your platform’s standard location is), it’s easy to end up in a situation where you unintentionally upgrade an application that shouldn’t be upgraded.
Or more generally, what if you want to install an application and leave it be? If an application works, any change in its libraries or the versions of those libraries can break the application.

# 安装virtualenv

POSIX系统下安装virtualenv直接看官网教程[1]即可。

-m mod : run library module as a script (terminates option list)

# 创建虚拟环境

POSIX系统看官网教程就可以了

Windows系统在cmd中运行：

• Include
• Lib
• Scripts
• tcl

0%