@@ -25,6 +25,19 @@ Syntax::
25
25
All command line options are passed directly to ``virtualenv ``. The
26
26
new environment is automatically activated after being initialized.
27
27
28
+ ::
29
+
30
+ $ workon
31
+ $ mkvirtualenv mynewenv
32
+ New python executable in mynewenv/bin/python
33
+ Installing distribute.............................................
34
+ ..................................................................
35
+ ..................................................................
36
+ done.
37
+ (mynewenv)$ workon
38
+ mynewenv
39
+ (mynewenv)$
40
+
28
41
.. seealso ::
29
42
30
43
* :ref: `scripts-premkvirtualenv `
@@ -39,6 +52,16 @@ Syntax::
39
52
40
53
rmvirtualenv ENVNAME
41
54
55
+ You must use :ref: `command-deactivate ` before removing the current
56
+ environment.
57
+
58
+ ::
59
+
60
+ (mynewenv)$ deactivate
61
+ $ rmvirtualenv mynewenv
62
+ $ workon
63
+ $
64
+
42
65
.. seealso ::
43
66
44
67
* :ref: `scripts-prermvirtualenv `
@@ -60,6 +83,28 @@ Syntax::
60
83
The environment created by the copy operation is made `relocatable
61
84
<http://virtualenv.openplans.org/#making-environments-relocatable> `__.
62
85
86
+ ::
87
+
88
+ $ workon
89
+ $ mkvirtualenv source
90
+ New python executable in source/bin/python
91
+ Installing distribute.............................................
92
+ ..................................................................
93
+ ..................................................................
94
+ done.
95
+ (source)$ cpvirtualenv source dest
96
+ Making script /Users/dhellmann/Devel/virtualenvwrapper/tmp/dest/bin/easy_install relative
97
+ Making script /Users/dhellmann/Devel/virtualenvwrapper/tmp/dest/bin/easy_install-2.6 relative
98
+ Making script /Users/dhellmann/Devel/virtualenvwrapper/tmp/dest/bin/pip relative
99
+ Script /Users/dhellmann/Devel/virtualenvwrapper/tmp/dest/bin/postactivate cannot be made relative (it's not a normal script that starts with #!/Users/dhellmann/Devel/virtualenvwrapper/tmp/dest/bin/python)
100
+ Script /Users/dhellmann/Devel/virtualenvwrapper/tmp/dest/bin/postdeactivate cannot be made relative (it's not a normal script that starts with #!/Users/dhellmann/Devel/virtualenvwrapper/tmp/dest/bin/python)
101
+ Script /Users/dhellmann/Devel/virtualenvwrapper/tmp/dest/bin/preactivate cannot be made relative (it's not a normal script that starts with #!/Users/dhellmann/Devel/virtualenvwrapper/tmp/dest/bin/python)
102
+ Script /Users/dhellmann/Devel/virtualenvwrapper/tmp/dest/bin/predeactivate cannot be made relative (it's not a normal script that starts with #!/Users/dhellmann/Devel/virtualenvwrapper/tmp/dest/bin/python)
103
+ (dest)$ workon
104
+ dest
105
+ source
106
+ (dest)$
107
+
63
108
.. seealso ::
64
109
65
110
* :ref: `scripts-precpvirtualenv `
@@ -83,13 +128,42 @@ Syntax::
83
128
If no ``environment_name `` is given the list of available environments
84
129
is printed to stdout.
85
130
131
+ ::
132
+
133
+ $ workon
134
+ $ mkvirtualenv env1
135
+ New python executable in env1/bin/python
136
+ Installing distribute.............................................
137
+ ..................................................................
138
+ ..................................................................
139
+ done.
140
+ (env1)$ mkvirtualenv env2
141
+ New python executable in env2/bin/python
142
+ Installing distribute.............................................
143
+ ..................................................................
144
+ ..................................................................
145
+ done.
146
+ (env2)$ workon
147
+ env1
148
+ env2
149
+ (env2)$ workon env1
150
+ (env1)$ echo $VIRTUAL_ENV
151
+ /Users/dhellmann/Devel/virtualenvwrapper/tmp/env1
152
+ (env1)$ workon env2
153
+ (env2)$ echo $VIRTUAL_ENV
154
+ /Users/dhellmann/Devel/virtualenvwrapper/tmp/env2
155
+ (env2)$
156
+
157
+
86
158
.. seealso ::
87
159
88
160
* :ref: `scripts-predeactivate `
89
161
* :ref: `scripts-postdeactivate `
90
162
* :ref: `scripts-preactivate `
91
163
* :ref: `scripts-postactivate `
92
164
165
+ .. _command-deactivate :
166
+
93
167
deactivate
94
168
----------
95
169
@@ -105,6 +179,24 @@ Syntax::
105
179
This command is actually part of virtualenv, but is wrapped to
106
180
provide before and after hooks, just as workon does for activate.
107
181
182
+ ::
183
+
184
+ $ workon
185
+ $ echo $VIRTUAL_ENV
186
+
187
+ $ mkvirtualenv env1
188
+ New python executable in env1/bin/python
189
+ Installing distribute.............................................
190
+ ..................................................................
191
+ ..................................................................
192
+ done.
193
+ (env1)$ echo $VIRTUAL_ENV
194
+ /Users/dhellmann/Devel/virtualenvwrapper/tmp/env1
195
+ (env1)$ deactivate
196
+ $ echo $VIRTUAL_ENV
197
+
198
+ $
199
+
108
200
.. seealso ::
109
201
110
202
* :ref: `scripts-predeactivate `
@@ -133,15 +225,20 @@ subdirectory.
133
225
134
226
::
135
227
136
- $ workon pymotw
137
- $ echo $VIRTUAL_ENV
138
- /Users/dhellmann/.virtualenvs/pymotw
139
- $ cdvirtualenv
140
- $ pwd
141
- /Users/dhellmann/.virtualenvs/pymotw
142
- $ cdvirtualenv bin
143
- $ pwd
144
- /Users/dhellmann/.virtualenvs/pymotw/bin
228
+ $ mkvirtualenv env1
229
+ New python executable in env1/bin/python
230
+ Installing distribute.............................................
231
+ ..................................................................
232
+ ..................................................................
233
+ done.
234
+ (env1)$ echo $VIRTUAL_ENV
235
+ /Users/dhellmann/Devel/virtualenvwrapper/tmp/env1
236
+ (env1)$ cdvirtualenv
237
+ (env1)$ pwd
238
+ /Users/dhellmann/Devel/virtualenvwrapper/tmp/env1
239
+ (env1)$ cdvirtualenv bin
240
+ (env1)$ pwd
241
+ /Users/dhellmann/Devel/virtualenvwrapper/tmp/env1/bin
145
242
146
243
cdsitepackages
147
244
--------------
@@ -162,12 +259,17 @@ directory to change into.
162
259
163
260
::
164
261
165
- $ workon pymotw
166
- $ echo $VIRTUAL_ENV
167
- /Users/dhellmann/.virtualenvs/pymotw
168
- $ cdsitepackages PyMOTW/bisect/
169
- $ pwd
170
- /Users/dhellmann/.virtualenvs/pymotw/lib/python2.6/site-packages/PyMOTW/bisect
262
+ $ mkvirtualenv env1
263
+ New python executable in env1/bin/python
264
+ Installing distribute.............................................
265
+ ..................................................................
266
+ ..................................................................
267
+ done.
268
+ (env1)$ echo $VIRTUAL_ENV
269
+ /Users/dhellmann/Devel/virtualenvwrapper/tmp/env1
270
+ (env1)$ cdsitepackages PyMOTW/bisect/
271
+ (env1)$ pwd
272
+ /Users/dhellmann/Devel/virtualenvwrapper/tmp/env1/lib/python2.6/site-packages/PyMOTW/bisect
171
273
172
274
lssitepackages
173
275
--------------
@@ -179,6 +281,19 @@ Syntax::
179
281
180
282
lssitepackages
181
283
284
+ ::
285
+
286
+ $ mkvirtualenv env1
287
+ New python executable in env1/bin/python
288
+ Installing distribute.............................................
289
+ ..................................................................
290
+ ..................................................................
291
+ done.
292
+ (env1)$ $ workon env1
293
+ (env1)$ lssitepackages
294
+ distribute-0.6.10-py2.6.egg pip-0.6.3-py2.6.egg
295
+ easy-install.pth setuptools.pth
296
+
182
297
===============
183
298
Path Management
184
299
===============
0 commit comments