4
Summary: Virtual Python Environment builder
5
Home-page: http://www.virtualenv.org
6
Author: Jannis Leidel, Carl Meyer and Brian Rosner
7
Author-email: python-virtualenv@groups.google.com
14
You can install virtualenv with ``pip install virtualenv``, or the `latest
15
development version <https://github.com/pypa/virtualenv/tarball/develop>`_
16
with ``pip install https://github.com/pypa/virtualenv/tarball/develop``.
18
You can also use ``easy_install``, or if you have no Python package manager
19
available at all, you can just grab the single file `virtualenv.py`_ and run
20
it with ``python virtualenv.py``.
22
.. _virtualenv.py: https://raw.github.com/pypa/virtualenv/master/virtualenv.py
27
``virtualenv`` is a tool to create isolated Python environments.
29
The basic problem being addressed is one of dependencies and versions,
30
and indirectly permissions. Imagine you have an application that
31
needs version 1 of LibFoo, but another application requires version
32
2. How can you use both these applications? If you install
33
everything into ``/usr/lib/python2.7/site-packages`` (or whatever your
34
platform's standard location is), it's easy to end up in a situation
35
where you unintentionally upgrade an application that shouldn't be
38
Or more generally, what if you want to install an application *and
39
leave it be*? If an application works, any change in its libraries or
40
the versions of those libraries can break the application.
42
Also, what if you can't install packages into the global
43
``site-packages`` directory? For instance, on a shared host.
45
In all these cases, ``virtualenv`` can help you. It creates an
46
environment that has its own installation directories, that doesn't
47
share libraries with other virtualenv environments (and optionally
48
doesn't access the globally installed libraries either).
55
$ python virtualenv.py ENV
57
If you install it you can also just do ``virtualenv ENV``.
59
This creates ``ENV/lib/pythonX.X/site-packages``, where any libraries you
60
install will go. It also creates ``ENV/bin/python``, which is a Python
61
interpreter that uses this environment. Anytime you use that interpreter
62
(including when a script has ``#!/path/to/ENV/bin/python`` in it) the libraries
63
in that environment will be used.
65
It also installs either `Setuptools
66
<http://peak.telecommunity.com/DevCenter/setuptools>`_ or `distribute
67
<http://pypi.python.org/pypi/distribute>`_ into the environment. To use
68
Distribute instead of setuptools, just call virtualenv like this::
70
$ python virtualenv.py --distribute ENV
72
You can also set the environment variable VIRTUALENV_DISTRIBUTE.
74
A new virtualenv also includes the `pip <http://pypi.python.org/pypi/pip>`_
75
installer, so you can use ``ENV/bin/pip`` to install additional packages into
82
In a newly created virtualenv there will be a ``bin/activate`` shell
83
script. For Windows systems, activation scripts are provided for CMD.exe
86
On Posix systems you can do::
90
This will change your ``$PATH`` so its first entry is the virtualenv's
91
``bin/`` directory. (You have to use ``source`` because it changes your
92
shell environment in-place.) This is all it does; it's purely a
93
convenience. If you directly run a script or the python interpreter
94
from the virtualenv's ``bin/`` directory (e.g. ``path/to/env/bin/pip``
95
or ``/path/to/env/bin/python script.py``) there's no need for
98
After activating an environment you can use the function ``deactivate`` to
99
undo the changes to your ``$PATH``.
101
The ``activate`` script will also modify your shell prompt to indicate
102
which environment is currently active. You can disable this behavior,
103
which can be useful if you have your own custom prompt that already
104
displays the active environment name. To do so, set the
105
``VIRTUAL_ENV_DISABLE_PROMPT`` environment variable to any non-empty
106
value before running the ``activate`` script.
108
On Windows you just do::
110
> \path\to\env\Scripts\activate
112
And type `deactivate` to undo the changes.
114
Based on your active shell (CMD.exe or Powershell.exe), Windows will use
115
either activate.bat or activate.ps1 (as appropriate) to activate the
116
virtual environment. If using Powershell, see the notes about code signing
121
If using Powershell, the ``activate`` script is subject to the
122
`execution policies`_ on the system. By default on Windows 7, the system's
123
excution policy is set to ``Restricted``, meaning no scripts like the
124
``activate`` script are allowed to be executed. But that can't stop us
125
from changing that slightly to allow it to be executed.
127
In order to use the script, you have to relax your system's execution
128
policy to ``AllSigned``, meaning all scripts on the system must be
129
digitally signed to be executed. Since the virtualenv activation
130
script is signed by one of the authors (Jannis Leidel) this level of
131
the execution policy suffices. As an administrator run::
133
PS C:\> Set-ExecutionPolicy AllSigned
135
Then you'll be asked to trust the signer, when executing the script.
136
You will be prompted with the following::
138
PS C:\> virtualenv .\foo
139
New python executable in C:\foo\Scripts\python.exe
140
Installing setuptools................done.
141
Installing pip...................done.
142
PS C:\> .\foo\scripts\activate
144
Do you want to run software from this untrusted publisher?
145
File C:\foo\scripts\activate.ps1 is published by E=jannis@leidel.info,
146
CN=Jannis Leidel, L=Berlin, S=Berlin, C=DE, Description=581796-Gh7xfJxkxQSIO4E0
147
and is not trusted on your system. Only run scripts from trusted publishers.
148
[V] Never run [D] Do not run [R] Run once [A] Always run [?] Help
152
If you select ``[A] Always Run``, the certificate will be added to the
153
Trusted Publishers of your user account, and will be trusted in this
154
user's context henceforth. If you select ``[R] Run Once``, the script will
155
be run, but you will be prometed on a subsequent invocation. Advanced users
156
can add the signer's certificate to the Trusted Publishers of the Computer
157
account to apply to all users (though this technique is out of scope of this
160
Alternatively, you may relax the system execution policy to allow running
161
of local scripts without verifying the code signature using the following::
163
PS C:\> Set-ExecutionPolicy RemoteSigned
165
Since the ``activate.ps1`` script is generated locally for each virtualenv,
166
it is not considered a remote script and can then be executed.
168
.. _`execution policies`: http://technet.microsoft.com/en-us/library/dd347641.aspx
170
The ``--system-site-packages`` Option
171
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
173
If you build with ``virtualenv --system-site-packages ENV``, your virtual
174
environment will inherit packages from ``/usr/lib/python2.7/site-packages``
175
(or wherever your global site-packages directory is).
177
This can be used if you have control over the global site-packages directory,
178
and you want to depend on the packages there. If you want isolation from the
179
global system, do not use this flag.
182
Environment variables and configuration files
183
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
185
virtualenv can not only be configured by passing command line options such as
186
``--distribute`` but also by two other means:
188
- Environment variables
190
Each command line option is automatically used to look for environment
191
variables with the name format ``VIRTUALENV_<UPPER_NAME>``. That means
192
the name of the command line options are capitalized and have dashes
193
(``'-'``) replaced with underscores (``'_'``).
195
For example, to automatically install Distribute instead of setuptools
196
you can also set an environment variable::
198
$ export VIRTUALENV_DISTRIBUTE=true
199
$ python virtualenv.py ENV
201
It's the same as passing the option to virtualenv directly::
203
$ python virtualenv.py --distribute ENV
205
This also works for appending command line options, like ``--find-links``.
206
Just leave an empty space between the passsed values, e.g.::
208
$ export VIRTUALENV_EXTRA_SEARCH_DIR="/path/to/dists /path/to/other/dists"
211
is the same as calling::
213
$ python virtualenv.py --extra-search-dir=/path/to/dists --extra-search-dir=/path/to/other/dists ENV
217
virtualenv also looks for a standard ini config file. On Unix and Mac OS X
218
that's ``$HOME/.virtualenv/virtualenv.ini`` and on Windows, it's
219
``%APPDATA%\virtualenv\virtualenv.ini``.
221
The names of the settings are derived from the long command line option,
222
e.g. the option ``--distribute`` would look like this::
227
Appending options like ``--extra-search-dir`` can be written on multiple
235
Please have a look at the output of ``virtualenv --help`` for a full list
236
of supported options.
241
Some paths within the virtualenv are slightly different on Windows: scripts and
242
executables on Windows go in ``ENV\Scripts\`` instead of ``ENV/bin/`` and
243
libraries go in ``ENV\Lib\`` rather than ``ENV/lib/``.
245
To create a virtualenv under a path with spaces in it on Windows, you'll need
246
the `win32api <http://sourceforge.net/projects/pywin32/>`_ library installed.
251
Beginning with virtualenv version 1.5 `PyPy <http://pypy.org>`_ is
252
supported. To use PyPy 1.4 or 1.4.1, you need a version of virtualenv >= 1.5.
253
To use PyPy 1.5, you need a version of virtualenv >= 1.6.1.
255
Creating Your Own Bootstrap Scripts
256
-----------------------------------
258
While this creates an environment, it doesn't put anything into the
259
environment. Developers may find it useful to distribute a script
260
that sets up a particular environment, for example a script that
261
installs a particular web application.
263
To create a script like this, call
264
``virtualenv.create_bootstrap_script(extra_text)``, and write the
265
result to your new bootstrapping script. Here's the documentation
268
Creates a bootstrap script, which is like this script but with
269
extend_parser, adjust_options, and after_install hooks.
271
This returns a string that (written to disk of course) can be used
272
as a bootstrap script with your own customizations. The script
273
will be the standard virtualenv.py script, with your extra text
274
added (your extra text should be Python code).
276
If you include these functions, they will be called:
278
``extend_parser(optparse_parser)``:
279
You can add or remove options from the parser here.
281
``adjust_options(options, args)``:
282
You can change options here, or change the args (if you accept
283
different kinds of arguments, be sure you modify ``args`` so it is
284
only ``[DEST_DIR]``).
286
``after_install(options, home_dir)``:
288
After everything is installed, this function is called. This
289
is probably the function you are most likely to use. An
292
def after_install(options, home_dir):
293
if sys.platform == 'win32':
297
subprocess.call([join(home_dir, bin, 'easy_install'),
299
subprocess.call([join(home_dir, bin, 'my-package-script'),
302
This example immediately installs a package, and runs a setup
303
script from that package.
308
Here's a more concrete example of how you could use this::
310
import virtualenv, textwrap
311
output = virtualenv.create_bootstrap_script(textwrap.dedent("""
312
import os, subprocess
313
def after_install(options, home_dir):
314
etc = join(home_dir, 'etc')
315
if not os.path.exists(etc):
317
subprocess.call([join(home_dir, 'bin', 'easy_install'),
319
subprocess.call([join(home_dir, 'bin', 'paster'),
320
'make-config', 'BlogApplication',
321
join(etc, 'blog.ini')])
322
subprocess.call([join(home_dir, 'bin', 'paster'),
323
'setup-app', join(etc, 'blog.ini')])
325
f = open('blog-bootstrap.py', 'w').write(output)
327
Another example is available `here
328
<https://github.com/socialplanning/fassembler/blob/master/fassembler/create-venv-script.py>`_.
331
Using Virtualenv without ``bin/python``
332
---------------------------------------
334
Sometimes you can't or don't want to use the Python interpreter
335
created by the virtualenv. For instance, in a `mod_python
336
<http://www.modpython.org/>`_ or `mod_wsgi <http://www.modwsgi.org/>`_
337
environment, there is only one interpreter.
339
Luckily, it's easy. You must use the custom Python interpreter to
340
*install* libraries. But to *use* libraries, you just have to be sure
341
the path is correct. A script is available to correct the path. You
342
can setup the environment like::
344
activate_this = '/path/to/env/bin/activate_this.py'
345
execfile(activate_this, dict(__file__=activate_this))
347
This will change ``sys.path`` and even change ``sys.prefix``, but also allow
348
you to use an existing interpreter. Items in your environment will show up
349
first on ``sys.path``, before global items. However, global items will
350
always be accessible (as if the ``--system-site-packages`` flag had been used
351
in creating the environment, whether it was or not). Also, this cannot undo
352
the activation of other environments, or modules that have been imported.
353
You shouldn't try to, for instance, activate an environment before a web
354
request; you should activate *one* environment as early as possible, and not
355
do it again in that process.
357
Making Environments Relocatable
358
-------------------------------
360
Note: this option is somewhat experimental, and there are probably
361
caveats that have not yet been identified. Also this does not
362
currently work on Windows.
364
Normally environments are tied to a specific path. That means that
365
you cannot move an environment around or copy it to another computer.
366
You can fix up an environment to make it relocatable with the
369
$ virtualenv --relocatable ENV
371
This will make some of the files created by setuptools or distribute
372
use relative paths, and will change all the scripts to use ``activate_this.py``
373
instead of using the location of the Python interpreter to select the
376
**Note:** you must run this after you've installed *any* packages into
377
the environment. If you make an environment relocatable, then
378
install a new package, you must run ``virtualenv --relocatable``
381
Also, this **does not make your packages cross-platform**. You can
382
move the directory around, but it can only be used on other similar
383
computers. Some known environmental differences that can cause
384
incompatibilities: a different version of Python, when one platform
385
uses UCS2 for its internal unicode representation and another uses
386
UCS4 (a compile-time option), obvious platform changes like Windows
387
vs. Linux, or Intel vs. ARM, and if you have libraries that bind to C
388
libraries on the system, if those C libraries are located somewhere
389
different (either different versions, or a different filesystem
392
If you use this flag to create an environment, currently, the
393
``--system-site-packages`` option will be implied.
395
The ``--extra-search-dir`` option
396
---------------------------------
398
When it creates a new environment, virtualenv installs either setuptools
399
or distribute, and pip. In normal operation when virtualenv is
400
installed, the bundled version of these packages included in the
401
``virtualenv_support`` directory is used. When ``virtualenv.py`` is run
402
standalone and ``virtualenv_support`` is not available, the latest
403
releases of these packages are fetched from the `Python Package Index
404
<http://pypi.python.org>`_ (PyPI).
406
As an alternative, you can provide your own versions of setuptools,
407
distribute and/or pip on the filesystem, and tell virtualenv to use
408
those distributions instead of downloading them from the Internet. To
409
use this feature, pass one or more ``--extra-search-dir`` options to
410
virtualenv like this::
412
$ virtualenv --extra-search-dir=/path/to/distributions ENV
414
The ``/path/to/distributions`` path should point to a directory that
415
contains setuptools, distribute and/or pip distributions. Setuptools
416
distributions must be ``.egg`` files; pip distributions should be
417
`.tar.gz` source distributions, and distribute distributions may be
418
either (if found an egg will be used preferentially).
420
Virtualenv will still download these packages if no satisfactory local
421
distributions are found.
423
If you are really concerned about virtualenv fetching these packages
424
from the Internet and want to ensure that it never will, you can also
425
provide an option ``--never-download`` like so::
427
$ virtualenv --extra-search-dir=/path/to/distributions --never-download ENV
429
If this option is provided, virtualenv will never try to download
430
setuptools/distribute or pip. Instead, it will exit with status code 1
431
if it fails to find local distributions for any of these required
432
packages. The local distribution lookup is done in the following
433
locations, with the most recent version found used:
435
#. The current directory.
436
#. The directory where virtualenv.py is located.
437
#. A ``virtualenv_support`` directory relative to the directory where
438
virtualenv.py is located.
439
#. If the file being executed is not named virtualenv.py (i.e. is a boot
440
script), a ``virtualenv_support`` directory relative to wherever
441
virtualenv.py is actually installed.
444
Compare & Contrast with Alternatives
445
------------------------------------
447
There are several alternatives that create isolated environments:
449
* ``workingenv`` (which I do not suggest you use anymore) is the
450
predecessor to this library. It used the main Python interpreter,
451
but relied on setting ``$PYTHONPATH`` to activate the environment.
452
This causes problems when running Python scripts that aren't part of
453
the environment (e.g., a globally installed ``hg`` or ``bzr``). It
454
also conflicted a lot with Setuptools.
457
<http://peak.telecommunity.com/DevCenter/EasyInstall#creating-a-virtual-python>`_
458
is also a predecessor to this library. It uses only symlinks, so it
459
couldn't work on Windows. It also symlinks over the *entire*
460
standard library and global ``site-packages``. As a result, it
461
won't see new additions to the global ``site-packages``.
463
This script only symlinks a small portion of the standard library
464
into the environment, and so on Windows it is feasible to simply
465
copy these files over. Also, it creates a new/empty
466
``site-packages`` and also adds the global ``site-packages`` to the
467
path, so updates are tracked separately. This script also installs
468
Setuptools automatically, saving a step and avoiding the need for
471
* `zc.buildout <http://pypi.python.org/pypi/zc.buildout>`_ doesn't
472
create an isolated Python environment in the same style, but
473
achieves similar results through a declarative config file that sets
474
up scripts with very particular packages. As a declarative system,
475
it is somewhat easier to repeat and manage, but more difficult to
476
experiment with. ``zc.buildout`` includes the ability to setup
477
non-Python systems (e.g., a database server or an Apache instance).
479
I *strongly* recommend anyone doing application development or
480
deployment use one of these tools.
485
Refer to the `contributing to pip`_ documentation - it applies equally to
486
virtualenv, except that virtualenv issues should filed on the `virtualenv
489
Virtualenv's release schedule is tied to pip's -- each time there's a new pip
490
release, there will be a new virtualenv release that bundles the new version of
493
Files in the `virtualenv_embedded/` subdirectory are embedded into
494
`virtualenv.py` itself as base64-encoded strings (in order to support
495
single-file use of `virtualenv.py` without installing it). If your patch
496
changes any file in `virtualenv_embedded/`, run `bin/rebuild-script.py` to
497
update the embedded version of that file in `virtualenv.py`; commit that and
498
submit it as part of your patch / pull request.
500
.. _contributing to pip: http://www.pip-installer.org/en/latest/contributing.html
501
.. _virtualenv repo: https://github.com/pypa/virtualenv/
506
Virtualenv's test suite is small and not yet at all comprehensive, but we aim
509
The easy way to run tests (handles test dependencies automatically)::
511
$ python setup.py test
513
If you want to run only a selection of the tests, you'll need to run them
514
directly with nose instead. Create a virtualenv, and install required
517
$ pip install nose mock
523
Or select just a single test file to run::
525
$ nosetests tests.test_virtualenv
528
Other Documentation and Links
529
-----------------------------
531
* James Gardner has written a tutorial on using `virtualenv with
533
<http://wiki.pylonshq.com/display/pylonscookbook/Using+a+Virtualenv+Sandbox>`_.
536
<http://blog.ianbicking.org/2007/10/10/workingenv-is-dead-long-live-virtualenv/>`_.
538
* Doug Hellmann wrote a description of his `command-line work flow
539
using virtualenv (virtualenvwrapper)
540
<http://www.doughellmann.com/articles/CompletelyDifferent-2008-05-virtualenvwrapper/index.html>`_
541
including some handy scripts to make working with multiple
542
environments easier. He also wrote `an example of using virtualenv
544
<http://www.doughellmann.com/articles/CompletelyDifferent-2008-02-ipython-and-virtualenv/index.html>`_.
546
* Chris Perkins created a `showmedo video including virtualenv
547
<http://showmedo.com/videos/video?name=2910000&fromSeriesID=291>`_.
549
* `Using virtualenv with mod_wsgi
550
<http://code.google.com/p/modwsgi/wiki/VirtualEnvironments>`_.
552
* `virtualenv commands
553
<https://github.com/thisismedium/virtualenv-commands>`_ for some more
554
workflow-related tools around virtualenv.
559
``virtualenv`` is a successor to `workingenv
560
<http://cheeseshop.python.org/pypi/workingenv.py>`_, and an extension
562
<http://peak.telecommunity.com/DevCenter/EasyInstall#creating-a-virtual-python>`_.
564
It was written by Ian Bicking, sponsored by the `Open Planning
565
Project <http://openplans.org>`_ and is now maintained by a
566
`group of developers <https://github.com/pypa/virtualenv/raw/master/AUTHORS.txt>`_.
567
It is licensed under an
568
`MIT-style permissive license <https://github.com/pypa/virtualenv/raw/master/LICENSE.txt>`_.
575
Python bugfix releases 2.6.8, 2.7.3, 3.1.5 and 3.2.3 include a change that
576
will cause "import random" to fail with "cannot import name urandom" on any
577
virtualenv created on a Unix host with an earlier release of Python
578
2.6/2.7/3.1/3.2, if the underlying system Python is upgraded. This is due to
579
the fact that a virtualenv uses the system Python's standard library but
580
contains its own copy of the Python interpreter, so an upgrade to the system
581
Python results in a mismatch between the version of the Python interpreter
582
and the version of the standard library. It can be fixed by removing
583
``$ENV/bin/python`` and re-running virtualenv on the same target directory
584
with the upgraded Python.
589
* Updated distribute to 0.6.31. This fixes #359 (numpy install regression) on
590
UTF-8 platforms, and provides a workaround on other platforms:
591
``PYTHONIOENCODING=utf8 pip install numpy``.
593
* When installing virtualenv via curl, don't forget to filter out arguments
594
the distribute setup script won't understand. Fixes #358.
596
* Added some more integration tests.
601
* Fixed readline on OS X. Thanks minrk
603
* Updated distribute to 0.6.30 (improves our error reporting, plus new
604
distribute features and fixes). Thanks Gabriel (g2p)
606
* Added compatibility with multiarch Python (Python 3.3 for example). Added an
607
integration test. Thanks Gabriel (g2p)
609
* Added ability to install distribute from a user-provided egg, rather than the
610
bundled sdist, for better speed. Thanks Paul Moore.
612
* Make the creation of lib64 symlink smarter about already-existing symlink,
613
and more explicit about full paths. Fixes #334 and #330. Thanks Jeremy Orem.
615
* Give lib64 site-dir preference over lib on 64-bit systems, to avoid wrong
616
32-bit compiles in the venv. Fixes #328. Thanks Damien Nozay.
618
* Fix a bug with prompt-handling in ``activate.csh`` in non-interactive csh
619
shells. Fixes #332. Thanks Benjamin Root for report and patch.
621
* Make it possible to create a virtualenv from within a Python
622
3.3. pyvenv. Thanks Chris McDonough for the report.
624
* Add optional --setuptools option to be able to switch to it in case
625
distribute is the default (like in Debian).
630
* Updated the included pip version to 1.2.1 to fix regressions introduced
637
* Fixed distribute version used with `--never-download`. Thanks michr for
640
* Fix creating Python 3.3 based virtualenvs by unsetting the
641
``__PYVENV_LAUNCHER__`` environment variable in subprocesses.
647
* **Dropped support for Python 2.4** The minimum supported Python version is
650
* Fix `--relocatable` on systems that use lib64. Fixes #78. Thanks Branden
653
* Symlink some additional modules under Python 3. Fixes #194. Thanks Vinay
654
Sajip, Ian Clelland, and Stefan Holek for the report.
656
* Fix ``--relocatable`` when a script uses ``__future__`` imports. Thanks
659
* Fix a bug in the config option parser that prevented setting negative
660
options with environemnt variables. Thanks Ralf Schmitt.
662
* Allow setting ``--no-site-packages`` from the config file.
664
* Use ``/usr/bin/multiarch-platform`` if available to figure out the include
665
directory. Thanks for the patch, Mika Laitio.
667
* Fix ``install_name_tool`` replacement to work on Python 3.X.
669
* Handle paths of users' site-packages on Mac OS X correctly when changing
672
* Updated the embedded version of distribute to 0.6.28 and pip to 1.2.
678
* Updated to distribute 0.6.27.
680
* Fix activate.fish on OS X. Fixes #8. Thanks David Schoonover.
682
* Create a virtualenv-x.x script with the Python version when installing, so
683
virtualenv for multiple Python versions can be installed to the same
684
script location. Thanks Miki Tebeka.
686
* Restored ability to create a virtualenv with a path longer than 78
687
characters, without breaking creation of virtualenvs with non-ASCII paths.
688
Thanks, Bradley Ayers.
690
* Added ability to create virtualenvs without having installed Apple's
691
developers tools (using an own implementation of ``install_name_tool``).
694
* Fixed PyPy and Jython support on Windows. Thanks Konstantin Zemlyak.
696
* Added pydoc script to ease use. Thanks Marc Abramowitz. Fixes #149.
698
* Fixed creating a bootstrap script on Python 3. Thanks Raul Leal. Fixes #280.
700
* Fixed inconsistency when having set the ``PYTHONDONTWRITEBYTECODE`` env var
701
with the --distribute option or the ``VIRTUALENV_USE_DISTRIBUTE`` env var.
702
``VIRTUALENV_USE_DISTRIBUTE`` is now considered again as a legacy alias.
708
* Fixed minor issue in `--relocatable`. Thanks, Cap Petschulat.
714
* Bumped the version string in ``virtualenv.py`` up, too.
716
* Fixed rST rendering bug of long description.
722
* Update embedded pip to version 1.1.
724
* Fix `--relocatable` under Python 3. Thanks Doug Hellmann.
726
* Added environ PATH modification to activate_this.py. Thanks Doug
727
Napoleone. Fixes #14.
729
* Support creating virtualenvs directly from a Python build directory on
730
Windows. Thanks CBWhiz. Fixes #139.
732
* Use non-recursive symlinks to fix things up for posix_local install
733
scheme. Thanks michr.
735
* Made activate script available for use with msys and cygwin on Windows.
736
Thanks Greg Haskins, Cliff Xuan, Jonathan Griffin and Doug Napoleone.
739
* Fixed creation of virtualenvs on Windows when Python is not installed for
740
all users. Thanks Anatoly Techtonik for report and patch and Doug
741
Napoleone for testing and confirmation. Fixes #87.
743
* Fixed creation of virtualenvs using -p in installs where some modules
744
that ought to be in the standard library (e.g. `readline`) are actually
745
installed in `site-packages` next to `virtualenv.py`. Thanks Greg Haskins
746
for report and fix. Fixes #167.
748
* Added activation script for Powershell (signed by Jannis Leidel). Many
749
thanks to Jason R. Coombs.
755
* Gave user-provided ``--extra-search-dir`` priority over default dirs for
756
finding setuptools/distribute (it already had priority for finding pip).
759
* Updated embedded Distribute release to 0.6.24. Thanks Alex Gronholm.
761
* Made ``--no-site-packages`` behavior the default behavior. The
762
``--no-site-packages`` flag is still permitted, but displays a warning when
763
used. Thanks Chris McDonough.
765
* New flag: ``--system-site-packages``; this flag should be passed to get the
766
previous default global-site-package-including behavior back.
768
* Added ability to set command options as environment variables and options
769
in a ``virtualenv.ini`` file.
771
* Fixed various encoding related issues with paths. Thanks Gunnlaugur Thor Briem.
773
* Made ``virtualenv.py`` script executable.
779
* Restored ability to run on Python 2.4, too.
785
* Restored ability to run on Python < 2.7.
791
* Updated embedded distribute release to 0.6.19.
793
* Updated embedded pip release to 1.0.2.
795
* Fixed #141 - Be smarter about finding pkg_resources when using the
796
non-default Python intepreter (by using the ``-p`` option).
798
* Fixed #112 - Fixed path in docs.
800
* Fixed #109 - Corrected doctests of a Logger method.
802
* Fixed #118 - Fixed creating virtualenvs on platforms that use the
803
"posix_local" install scheme, such as Ubuntu with Python 2.7.
805
* Add missing library to Python 3 virtualenvs (``_dummy_thread``).
811
* Start to use git-flow.
813
* Added support for PyPy 1.5
815
* Fixed #121 -- added sanity-checking of the -p argument. Thanks Paul Nasrat.
817
* Added progress meter for pip installation as well as setuptools. Thanks Ethan
820
* Added --never-download and --search-dir options. Thanks Ethan Jucovy.
826
* Added Python 3 support! Huge thanks to Vinay Sajip and Vitaly Babiy.
828
* Fixed creation of virtualenvs on Mac OS X when standard library modules
829
(readline) are installed outside the standard library.
831
* Updated bundled pip to 1.0.
837
* Moved main repository to Github: https://github.com/pypa/virtualenv
839
* Transferred primary maintenance from Ian to Jannis Leidel, Carl Meyer and Brian Rosner
841
* Fixed a few more pypy related bugs.
843
* Updated bundled pip to 0.8.2.
845
* Handed project over to new team of maintainers.
847
* Moved virtualenv to Github at https://github.com/pypa/virtualenv
853
* Added ``_weakrefset`` requirement for Python 2.7.1.
855
* Fixed Windows regression in 1.5
863
* Add support for PyPy.
865
* Uses a proper temporary dir when installing environment requirements.
867
* Add ``--prompt`` option to be able to override the default prompt prefix.
869
* Fix an issue with ``--relocatable`` on Windows.
871
* Fix issue with installing the wrong version of distribute.
873
* Add fish and csh activate scripts.
885
* Fix for Mac OS X Framework builds that use
886
``--universal-archs=intel``
888
* Fix ``activate_this.py`` on Windows.
890
* Allow ``$PYTHONHOME`` to be set, so long as you use ``source
891
bin/activate`` it will get unset; if you leave it set and do not
892
activate the environment it will still break the environment.
906
* Allow ``activate.sh`` to skip updating the prompt (by setting
907
``$VIRTUAL_ENV_DISABLE_PROMPT``).
915
* Fix ``activate.bat`` and ``deactivate.bat`` under Windows when
916
``PATH`` contained a parenthesis
922
* Include pip 0.6.2 and Distribute 0.6.10
924
* Create the ``virtualenv`` script even when Setuptools isn't
927
* Fix problem with ``virtualenv --relocate`` when ``bin/`` has
928
subdirectories (e.g., ``bin/.svn/``); from Alan Franzoni.
930
* If you set ``$VIRTUALENV_DISTRIBUTE`` then virtualenv will use
931
Distribute by default (so you don't have to remember to use
944
* Fix pip installation on Windows
946
* Fix use of stand-alone ``virtualenv.py`` (and boot scripts)
948
* Exclude ~/.local (user site-packages) from environments when using
949
``--no-site-packages``
961
* Updated setuptools to 0.6c11
963
* Added the --distribute option
965
* Fixed packaging problem of support-files
971
* Virtualenv now copies the actual embedded Python binary on
972
Mac OS X to fix a hang on Snow Leopard (10.6).
974
* Fail more gracefully on Windows when ``win32api`` is not installed.
976
* Fix site-packages taking precedent over Jython's ``__classpath__``
977
and also specially handle the new ``__pyclasspath__`` entry in
980
* Now copies Jython's ``registry`` file to the virtualenv if it exists.
982
* Better find libraries when compiling extensions on Windows.
984
* Create ``Scripts\pythonw.exe`` on Windows.
986
* Added support for the Debian/Ubuntu
987
``/usr/lib/pythonX.Y/dist-packages`` directory.
989
* Set ``distutils.sysconfig.get_config_vars()['LIBDIR']`` (based on
990
``sys.real_prefix``) which is reported to help building on Windows.
992
* Make ``deactivate`` work on ksh
994
* Fixes for ``--python``: make it work with ``--relocatable`` and the
995
symlink created to the exact Python version.
1001
* Use Windows newlines in ``activate.bat``, which has been reported to help
1002
when using non-ASCII directory names.
1004
* Fixed compatibility with Jython 2.5b1.
1006
* Added a function ``virtualenv.install_python`` for more fine-grained
1007
access to what ``virtualenv.create_environment`` does.
1009
* Fix `a problem <https://bugs.launchpad.net/virtualenv/+bug/241581>`_
1010
with Windows and paths that contain spaces.
1012
* If ``/path/to/env/.pydistutils.cfg`` exists (or
1013
``/path/to/env/pydistutils.cfg`` on Windows systems) then ignore
1014
``~/.pydistutils.cfg`` and use that other file instead.
1017
<https://bugs.launchpad.net/virtualenv/+bug/340050>`_ picking up
1018
some ``.so`` libraries in ``/usr/local``.
1024
* Remove the ``[install] prefix = ...`` setting from the virtualenv
1025
``distutils.cfg`` -- this has been causing problems for a lot of
1026
people, in rather obscure ways.
1028
* If you use a boot script it will attempt to import ``virtualenv``
1029
and find a pre-downloaded Setuptools egg using that.
1031
* Added platform-specific paths, like ``/usr/lib/pythonX.Y/plat-linux2``
1037
* Real Python 2.6 compatibility. Backported the Python 2.6 updates to
1038
``site.py``, including `user directories
1039
<http://docs.python.org/dev/whatsnew/2.6.html#pep-370-per-user-site-packages-directory>`_
1040
(this means older versions of Python will support user directories,
1041
whether intended or not).
1043
* Always set ``[install] prefix`` in ``distutils.cfg`` -- previously
1044
on some platforms where a system-wide ``distutils.cfg`` was present
1045
with a ``prefix`` setting, packages would be installed globally
1046
(usually in ``/usr/local/lib/pythonX.Y/site-packages``).
1048
* Sometimes Cygwin seems to leave ``.exe`` off ``sys.executable``; a
1049
workaround is added.
1051
* Fix ``--python`` option.
1053
* Fixed handling of Jython environments that use a
1054
jython-complete.jar.
1060
* Update to Setuptools 0.6c9
1061
* Added an option ``virtualenv --relocatable EXISTING_ENV``, which
1062
will make an existing environment "relocatable" -- the paths will
1063
not be absolute in scripts, ``.egg-info`` and ``.pth`` files. This
1064
may assist in building environments that can be moved and copied.
1065
You have to run this *after* any new packages installed.
1066
* Added ``bin/activate_this.py``, a file you can use like
1067
``execfile("path_to/activate_this.py",
1068
dict(__file__="path_to/activate_this.py"))`` -- this will activate
1069
the environment in place, similar to what `the mod_wsgi example
1070
does <http://code.google.com/p/modwsgi/wiki/VirtualEnvironments>`_.
1071
* For Mac framework builds of Python, the site-packages directory
1072
``/Library/Python/X.Y/site-packages`` is added to ``sys.path``, from
1074
* Some platform-specific modules in Macs are added to the path now
1075
(``plat-darwin/``, ``plat-mac/``, ``plat-mac/lib-scriptpackages``),
1077
* Fixed a small Bashism in the ``bin/activate`` shell script.
1078
* Added ``__future__`` to the list of required modules, for Python
1079
2.3. You'll still need to backport your own ``subprocess`` module.
1080
* Fixed the ``__classpath__`` entry in Jython's ``sys.path`` taking
1081
precedent over virtualenv's libs.
1087
* Added a ``--python`` option to select the Python interpreter.
1088
* Add ``warnings`` to the modules copied over, for Python 2.6 support.
1089
* Add ``sets`` to the module copied over for Python 2.3 (though Python
1090
2.3 still probably doesn't work).
1096
* Added support for Jython 2.5.
1102
* Added support for Python 2.6.
1103
* Fix a problem with missing ``DLLs/zlib.pyd`` on Windows. Create
1104
* ``bin/python`` (or ``bin/python.exe``) even when you run virtualenv
1105
with an interpreter named, e.g., ``python2.4``
1106
* Fix MacPorts Python
1107
* Added --unzip-setuptools option
1108
* Update to Setuptools 0.6c8
1109
* If the current directory is not writable, run ez_setup.py in ``/tmp``
1110
* Copy or symlink over the ``include`` directory so that packages will
1111
more consistently compile.
1117
* Fix build on systems that use ``/usr/lib64``, distinct from
1118
``/usr/lib`` (specifically CentOS x64).
1119
* Fixed bug in ``--clear``.
1120
* Fixed typos in ``deactivate.bat``.
1121
* Preserve ``$PYTHONPATH`` when calling subprocesses.
1127
* Fix include dir copying on Windows (makes compiling possible).
1128
* Include the main ``lib-tk`` in the path.
1129
* Patch ``distutils.sysconfig``: ``get_python_inc`` and
1130
``get_python_lib`` to point to the global locations.
1131
* Install ``distutils.cfg`` before Setuptools, so that system
1132
customizations of ``distutils.cfg`` won't effect the installation.
1133
* Add ``bin/pythonX.Y`` to the virtualenv (in addition to
1135
* Fixed an issue with Mac Framework Python builds, and absolute paths
1136
(from Ronald Oussoren).
1142
* Improve ability to create a virtualenv from inside a virtualenv.
1143
* Fix a little bug in ``bin/activate``.
1144
* Actually get ``distutils.cfg`` to work reliably.
1150
* Added ``lib-dynload`` and ``config`` to things that need to be
1151
copied over in an environment.
1152
* Copy over or symlink the ``include`` directory, so that you can
1153
build packages that need the C headers.
1154
* Include a ``distutils`` package, so you can locally update
1155
``distutils.cfg`` (in ``lib/pythonX.Y/distutils/distutils.cfg``).
1156
* Better avoid downloading Setuptools, and hitting PyPI on environment
1158
* Fix a problem creating a ``lib64/`` directory.
1159
* Should work on MacOSX Framework builds (the default Python
1160
installations on Mac). Thanks to Ronald Oussoren.
1166
* Windows installs would sometimes give errors about ``sys.prefix`` that
1168
* Slightly prettier output.
1174
* Added support for Windows.
1180
* Give a better warning if you are on an unsupported platform (Mac
1181
Framework Pythons, and Windows).
1182
* Give error about running while inside a workingenv.
1183
* Give better error message about Python 2.3.
1189
Fixed packaging of the library.
1195
Initial release. Everything is changed and new!
1197
Keywords: setuptools deployment installation distutils
1199
Classifier: Development Status :: 4 - Beta
1200
Classifier: Intended Audience :: Developers
1201
Classifier: License :: OSI Approved :: MIT License
1202
Classifier: Programming Language :: Python :: 2
1203
Classifier: Programming Language :: Python :: 2.5
1204
Classifier: Programming Language :: Python :: 2.6
1205
Classifier: Programming Language :: Python :: 2.7
1206
Classifier: Programming Language :: Python :: 3
1207
Classifier: Programming Language :: Python :: 3.1
1208
Classifier: Programming Language :: Python :: 3.2