forked from lsblakk/pystar
/
dep-virtualenv.txt
54 lines (32 loc) · 1.12 KB
/
dep-virtualenv.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
.. _dep-virtualenv-label:
virtualenv
--------------------
.. _dep-virtualenv-what-label:
What is ``virtualenv``?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
``virtualenv`` is a tool that creates "new" Python installations that are
copies of your installed Python. These "virtual environments" are clean and
consistent.
.. _dep-virtualenv-why-label:
Why do I need ``virtualenv``?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To keep work areas clean and consistent, and minimize assumptions about
what tools are installed where. This makes it easier to have repeatable,
consistent builds.
.. _dep-virtualenv-how-label:
Get ``virtualenv``!
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
$ pip install virtualenv
.. _dep-virtualenv-verify-label:
Verify It Works!
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
# assume you have created a directory D and moved to it!
$ virtualenv --no-site-packages testenv
$ . testenv/bin/activate # windows -> . testenv\Scripts\activate.bat
# your prompt should change to say (testenv)
$ deactivate
# remove the testenv directory
rm -rf testenv
* http://pypi.python.org/pypi/virtualenv