10
10
virtualenvwrapper is a set of shell *functions* defined in Bourne
11
shell compatible syntax. It is tested under `bash`, `ksh`, and `zsh`.
11
shell compatible syntax. Its automated tests run under these
12
shells on OS X and Linux:
12
18
It may work with other shells, so if you find that it does work with a
13
19
shell not listed here please let me know. If you can modify it to
14
work with another shell, without completely rewriting it, send a pull
15
request through the bitbucket project page. If you write a clone to
20
work with another shell without completely rewriting it, then send a pull
21
request through the `bitbucket project page`_. If you write a clone to
16
22
work with an incompatible shell, let me know and I will link to it
25
.. _bitbucket project page: https://bitbucket.org/dhellmann/virtualenvwrapper/
30
It is possible to use virtualenv wrapper under `MSYS
31
<http://www.mingw.org/wiki/MSYS>`_ with a native Windows Python
32
installation. In order to make it work, you need to define an extra
33
environment variable named ``MSYS_HOME`` containing the root path to
34
the MSYS installation.
38
export WORKON_HOME=$HOME/.virtualenvs
39
export MSYS_HOME=/c/msys/1.0
40
source /usr/local/bin/virtualenvwrapper.sh
44
export WORKON_HOME=$HOME/.virtualenvs
45
export MSYS_HOME=C:\msys\1.0
46
source /usr/local/bin/virtualenvwrapper.sh
48
Depending on your MSYS setup, you may need to install the `MSYS mktemp
49
binary`_ in the ``MSYS_HOME/bin`` folder.
51
.. _MSYS mktemp binary: http://sourceforge.net/projects/mingw/files/MSYS/mktemp/
56
Guillermo López-Anglada has ported virtualenvwrapper to run under
57
Microsoft's PowerShell. We have agreed that since it is not compatible
58
with the rest of the extensions, and is largely a re-implementation
59
(rather than an adaptation), it should be distributed separately. You
60
can download virtualenvwrapper-powershell_ from PyPI.
62
.. _virtualenvwrapper-powershell: http://pypi.python.org/pypi/virtualenvwrapper-powershell/2.7.1
19
64
.. _supported-versions:
61
106
Shell Startup File
62
107
==================
64
Add two lines to your shell startup file (``.bashrc``, ``.profile``,
65
etc.) to set the location where the virtual environments should live
66
and the location of the script installed with this package::
109
Add three lines to your shell startup file (``.bashrc``, ``.profile``,
110
etc.) to set the location where the virtual environments should live,
111
the location of your development project directorkes, and the location
112
of the script installed with this package::
68
114
export WORKON_HOME=$HOME/.virtualenvs
115
export PROJECT_HOME=$HOME/Devel
69
116
source /usr/local/bin/virtualenvwrapper.sh
71
118
After editing it, reload the startup file (e.g., run ``source
96
145
the directory does not exist when virtualenvwrapper is loaded, it will
97
146
be created automatically.
148
.. _variable-PROJECT_HOME:
150
Location of Project Directories
151
-------------------------------
153
The variable ``PROJECT_HOME`` tells virtualenvwrapper where to place
154
your project working directories. The variable must be set and the
155
directory created before :ref:`command-mkproject` is used.
159
* :ref:`project-management`
161
.. _variable-VIRTUALENVWRAPPER_PROJECT_FILENAME:
163
Project Linkage Filename
164
------------------------
166
The variable ``VIRTUALENVWRAPPER_PROJECT_FILENAME`` tells
167
virtualenvwrapper how to name the file linking a virtualenv to a
168
project working directory. The default is ``.project``.
172
* :ref:`project-management`
99
174
.. _variable-VIRTUALENVWRAPPER_HOOK_DIR:
101
176
Location of Hook Scripts
186
265
cannot disable it. Refer to the documentation for the shell to
187
266
identify the appropriate file to edit.
271
Version 2.9 includes the features previously delivered separately by
272
``virtualenvwrapper.project``. If you have an older verison of the
273
project extensions installed, remove them before upgrading.
189
275
Upgrading from 1.x
190
276
==================
196
282
/usr/local/bin/virtualenvwrapper.sh``.
198
284
.. _pip: http://pypi.python.org/pypi/pip
200
Using virtualenvwrapper Under MSys
201
==================================
203
It is possible to use virtualenv wrapper under `MSYS
204
<http://www.mingw.org/wiki/MSYS>`_ with a native Windows Python
205
installation. In order to make it work, you need to define an extra
206
environment variable named ``MSYS_HOME`` containing the root path to
207
the MSYS installation.
211
export WORKON_HOME=$HOME/.virtualenvs
212
export MSYS_HOME=/c/msys/1.0
213
source /usr/local/bin/virtualenvwrapper.sh
217
export WORKON_HOME=$HOME/.virtualenvs
218
export MSYS_HOME=C:\msys\1.0
219
source /usr/local/bin/virtualenvwrapper.sh
221
Depending on your MSYS setup, you may need to install the `MSYS mktemp
222
binary`_ in the ``MSYS_HOME/bin`` folder.
224
.. _MSYS mktemp binary: http://sourceforge.net/projects/mingw/files/MSYS/mktemp/