virtualenv

$ mkdir myproject
$ cd myproject
$ python3 -m venv venv
New python executable in venv/bin/python
Installing setuptools, pip............done.

Now, whenever you want to work on a project, you only have to activate the corresponding environment. On OS X and Linux, do the following:

$ . venv/bin/activate

Windows:

$ venv\scripts\activate

And if you want to go back to the real world, use the following command:

$ deactivate

 

posted @ 2016-10-26 10:27  sufei  阅读(137)  评论(0编辑  收藏  举报