关于virtualenvwrapper的说明

简述

virtaulenvwrapper是virtualenv的扩展包,可以更方便地新增,删除,复制,切换虚拟环境。
官方说明:https://bitbucket.org/dhellmann/virtualenvwrapper/src/master/README.txt

..   -*- mode: rst -*-

#################
virtualenvwrapper
#################

virtualenvwrapper is a set of extensions to Ian Bicking's `virtualenv
<http://pypi.python.org/pypi/virtualenv>`_ tool.  The extensions include
wrappers for creating and deleting virtual environments and otherwise
managing your development workflow, making it easier to work on more
than one project at a time without introducing conflicts in their
dependencies.

**Warning:** The 4.x release includes some potentially incompatible
changes for extensions from 3.x. The python modules for extensions are
now *always* run with ``PWD=$WORKON_HOME`` (previously the value of
PWD varied depending on the hook). The *shell* portion of any hook
(anything sourced by the user's shell when the hook is run) is still
run in the same place as before.

========
Features
========

1.  Organizes all of your virtual environments in one place.

2.  Wrappers for creating, copying and deleting environments, including
    user-configurable hooks.

3.  Use a single command to switch between environments.

4.  Tab completion for commands that take a virtual environment as
    argument.

5. User-configurable hooks for all operations.

6. Plugin system for more creating sharable extensions.

Rich Leland has created a short `screencast
<http://mathematism.com/2009/07/30/presentation-pip-and-virtualenv/>`__
showing off the features of virtualenvwrapper.

============
Installation
============

See the `project documentation
<http://www.doughellmann.com/docs/virtualenvwrapper/>`__ for
installation and setup instructions.

===============
Python Versions
===============

virtualenvwrapper is tested under Python 2.6 - 3.6.

===============
Shell Aliases
=============

Since virtualenvwrapper is largely a shell script, it uses shell
commands for a lot of its actions.  If your environment makes heavy
use of shell aliases or other customizations, you may encounter
issues.  Before reporting bugs in the bug tracker, please test
*without* your aliases enabled.  If you can identify the alias causing
the problem, that will help make virtualenvwrapper more robust.

virtualenvwrapper的使用方法

Setup:

 1. Create a directory to hold the virtual environments.
    (mkdir $HOME/.virtualenvs).
创建一个文件夹叫做`.virtualenvs`用来存放所有的虚拟环境,即以后创建的所有虚拟环境都会放在一个文件夹里
 2. Add a line like "export WORKON_HOME=$HOME/.virtualenvs"
    to your .bashrc.
将刚才创建的文件夹加入到系统的环境变量中
 3. Add a line like "source /path/to/this/file/virtualenvwrapper.sh"
    to your .bashrc.
 4. Run: source ~/.bashrc
 5. Run: workon
 6. A list of environments, empty, is printed.
 7. Run: mkvirtualenv temp
 8. Run: workon
 9. This time, the "temp" environment is included.
10. Run: workon temp
11. The virtual environment is activated.
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 安装Git Git的下载地址:Git官网下载地址 Git本地仓库和命令 配置用户 下载完Git后,右键会有一个Gi...
    TokyoZ阅读 4,529评论 1 7
  • # Python 资源大全中文版 我想很多程序员应该记得 GitHub 上有一个 Awesome - XXX 系列...
    小迈克阅读 3,055评论 1 3
  • Git和Github学习 1.创建版本库 安装git,至于这个话题就不细说了,按照你电脑的操作系统下载一个合适的g...
    郭子web阅读 385评论 0 0
  • 虚拟环境工具对比 目前接触的开发环境相关: 系统开发环境:Windows、 linux(Ubuntu16.04 l...
    土卡拉阅读 342评论 0 0
  • Uniqueness Pt. 3 “The secret of business is to know somet...
    wawdgbb阅读 309评论 0 0