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 ``virtualenv`` is a tool to create isolated Python environments.
16 The basic problem being addressed is one of dependencies and versions,
17 and indirectly permissions. Imagine you have an application that
18 needs version 1 of LibFoo, but another application requires version
19 2. How can you use both these applications? If you install
20 everything into ``/usr/lib/python2.7/site-packages`` (or whatever your
21 platform's standard location is), it's easy to end up in a situation
22 where you unintentionally upgrade an application that shouldn't be
25 Or more generally, what if you want to install an application *and
26 leave it be*? If an application works, any change in its libraries or
27 the versions of those libraries can break the application.
29 Also, what if you can't install packages into the global
30 ``site-packages`` directory? For instance, on a shared host.
32 In all these cases, ``virtualenv`` can help you. It creates an
33 environment that has its own installation directories, that doesn't
34 share libraries with other virtualenv environments (and optionally
35 doesn't access the globally installed libraries either).
43 We advise installing virtualenv-1.9 or greater. Prior to version 1.9, the
44 pip included in virtualenv did not not download from PyPI over SSL.
48 When using pip to install virtualenv, we advise using pip 1.3 or greater.
49 Prior to version 1.3, pip did not not download from PyPI over SSL.
53 We advise against using easy_install to install virtualenv when using
54 setuptools < 0.9.7, because easy_install didn't download from PyPI over SSL
55 and was broken in some subtle ways.
57 To install globally with `pip` (if you have pip 1.3 or greater installed globally):
61 $ [sudo] pip install virtualenv
63 Or to get the latest unreleased dev version:
67 $ [sudo] pip install https://github.com/pypa/virtualenv/tarball/develop
70 To install globally from source:
74 $ curl -O https://pypi.python.org/packages/source/v/virtualenv/virtualenv-X.X.tar.gz
75 $ tar xvfz virtualenv-X.X.tar.gz
77 $ [sudo] python setup.py install
80 To *use* locally from source:
84 $ curl -O https://pypi.python.org/packages/source/v/virtualenv/virtualenv-X.X.tar.gz
85 $ tar xvfz virtualenv-X.X.tar.gz
87 $ python virtualenv.py myVE
91 The ``virtualenv.py`` script is *not* supported if run without the
92 necessary pip/setuptools/virtualenv distributions available locally. All
93 of the installation methods above include a ``virtualenv_support``
94 directory alongside ``virtualenv.py`` which contains a complete set of
95 pip and setuptools distributions, and so are fully supported.
104 This creates ``ENV/lib/pythonX.X/site-packages``, where any libraries you
105 install will go. It also creates ``ENV/bin/python``, which is a Python
106 interpreter that uses this environment. Anytime you use that interpreter
107 (including when a script has ``#!/path/to/ENV/bin/python`` in it) the libraries
108 in that environment will be used.
110 It also installs either `Setuptools
111 <http://peak.telecommunity.com/DevCenter/setuptools>`_ into the environment.
115 Virtualenv (<1.10) used to provide a ``--distribute`` option to use the
116 setuptools fork Distribute_. Since Distribute has been merged back into
117 setuptools this option is now no-op, it will always use the improved
120 A new virtualenv also includes the `pip <http://pypi.python.org/pypi/pip>`_
121 installer, so you can use ``ENV/bin/pip`` to install additional packages into
124 .. _Distribute: https://pypi.python.org/pypi/distribute
129 In a newly created virtualenv there will be a ``bin/activate`` shell
130 script. For Windows systems, activation scripts are provided for CMD.exe
133 On Posix systems you can do::
135 $ source bin/activate
137 This will change your ``$PATH`` so its first entry is the virtualenv's
138 ``bin/`` directory. (You have to use ``source`` because it changes your
139 shell environment in-place.) This is all it does; it's purely a
140 convenience. If you directly run a script or the python interpreter
141 from the virtualenv's ``bin/`` directory (e.g. ``path/to/env/bin/pip``
142 or ``/path/to/env/bin/python script.py``) there's no need for
145 After activating an environment you can use the function ``deactivate`` to
146 undo the changes to your ``$PATH``.
148 The ``activate`` script will also modify your shell prompt to indicate
149 which environment is currently active. You can disable this behavior,
150 which can be useful if you have your own custom prompt that already
151 displays the active environment name. To do so, set the
152 ``VIRTUAL_ENV_DISABLE_PROMPT`` environment variable to any non-empty
153 value before running the ``activate`` script.
155 On Windows you just do::
157 > \path\to\env\Scripts\activate
159 And type `deactivate` to undo the changes.
161 Based on your active shell (CMD.exe or Powershell.exe), Windows will use
162 either activate.bat or activate.ps1 (as appropriate) to activate the
163 virtual environment. If using Powershell, see the notes about code signing
168 If using Powershell, the ``activate`` script is subject to the
169 `execution policies`_ on the system. By default on Windows 7, the system's
170 excution policy is set to ``Restricted``, meaning no scripts like the
171 ``activate`` script are allowed to be executed. But that can't stop us
172 from changing that slightly to allow it to be executed.
174 In order to use the script, you have to relax your system's execution
175 policy to ``AllSigned``, meaning all scripts on the system must be
176 digitally signed to be executed. Since the virtualenv activation
177 script is signed by one of the authors (Jannis Leidel) this level of
178 the execution policy suffices. As an administrator run::
180 PS C:\> Set-ExecutionPolicy AllSigned
182 Then you'll be asked to trust the signer, when executing the script.
183 You will be prompted with the following::
185 PS C:\> virtualenv .\foo
186 New python executable in C:\foo\Scripts\python.exe
187 Installing setuptools................done.
188 Installing pip...................done.
189 PS C:\> .\foo\scripts\activate
191 Do you want to run software from this untrusted publisher?
192 File C:\foo\scripts\activate.ps1 is published by E=jannis@leidel.info,
193 CN=Jannis Leidel, L=Berlin, S=Berlin, C=DE, Description=581796-Gh7xfJxkxQSIO4E0
194 and is not trusted on your system. Only run scripts from trusted publishers.
195 [V] Never run [D] Do not run [R] Run once [A] Always run [?] Help
199 If you select ``[A] Always Run``, the certificate will be added to the
200 Trusted Publishers of your user account, and will be trusted in this
201 user's context henceforth. If you select ``[R] Run Once``, the script will
202 be run, but you will be prometed on a subsequent invocation. Advanced users
203 can add the signer's certificate to the Trusted Publishers of the Computer
204 account to apply to all users (though this technique is out of scope of this
207 Alternatively, you may relax the system execution policy to allow running
208 of local scripts without verifying the code signature using the following::
210 PS C:\> Set-ExecutionPolicy RemoteSigned
212 Since the ``activate.ps1`` script is generated locally for each virtualenv,
213 it is not considered a remote script and can then be executed.
215 .. _`execution policies`: http://technet.microsoft.com/en-us/library/dd347641.aspx
217 The ``--system-site-packages`` Option
218 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
220 If you build with ``virtualenv --system-site-packages ENV``, your virtual
221 environment will inherit packages from ``/usr/lib/python2.7/site-packages``
222 (or wherever your global site-packages directory is).
224 This can be used if you have control over the global site-packages directory,
225 and you want to depend on the packages there. If you want isolation from the
226 global system, do not use this flag.
229 Environment variables and configuration files
230 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
232 virtualenv can not only be configured by passing command line options such as
233 ``--python`` but also by two other means:
235 - Environment variables
237 Each command line option is automatically used to look for environment
238 variables with the name format ``VIRTUALENV_<UPPER_NAME>``. That means
239 the name of the command line options are capitalized and have dashes
240 (``'-'``) replaced with underscores (``'_'``).
242 For example, to automatically use a custom Python binary instead of the
243 one virtualenv is run with you can also set an environment variable::
245 $ export VIRTUALENV_PYTHON=/opt/python-3.3/bin/python
248 It's the same as passing the option to virtualenv directly::
250 $ virtualenv --python=/opt/python-3.3/bin/python ENV
252 This also works for appending command line options, like ``--find-links``.
253 Just leave an empty space between the passsed values, e.g.::
255 $ export VIRTUALENV_EXTRA_SEARCH_DIR="/path/to/dists /path/to/other/dists"
258 is the same as calling::
260 $ virtualenv --extra-search-dir=/path/to/dists --extra-search-dir=/path/to/other/dists ENV
264 virtualenv also looks for a standard ini config file. On Unix and Mac OS X
265 that's ``$HOME/.virtualenv/virtualenv.ini`` and on Windows, it's
266 ``%APPDATA%\virtualenv\virtualenv.ini``.
268 The names of the settings are derived from the long command line option,
269 e.g. the option ``--python`` would look like this::
272 python = /opt/python-3.3/bin/python
274 Appending options like ``--extra-search-dir`` can be written on multiple
282 Please have a look at the output of ``virtualenv --help`` for a full list
283 of supported options.
288 Some paths within the virtualenv are slightly different on Windows: scripts and
289 executables on Windows go in ``ENV\Scripts\`` instead of ``ENV/bin/`` and
290 libraries go in ``ENV\Lib\`` rather than ``ENV/lib/``.
292 To create a virtualenv under a path with spaces in it on Windows, you'll need
293 the `win32api <http://sourceforge.net/projects/pywin32/>`_ library installed.
298 Beginning with virtualenv version 1.5 `PyPy <http://pypy.org>`_ is
299 supported. To use PyPy 1.4 or 1.4.1, you need a version of virtualenv >= 1.5.
300 To use PyPy 1.5, you need a version of virtualenv >= 1.6.1.
302 Creating Your Own Bootstrap Scripts
303 -----------------------------------
305 While this creates an environment, it doesn't put anything into the
306 environment. Developers may find it useful to distribute a script
307 that sets up a particular environment, for example a script that
308 installs a particular web application.
310 To create a script like this, call
311 ``virtualenv.create_bootstrap_script(extra_text)``, and write the
312 result to your new bootstrapping script. Here's the documentation
315 Creates a bootstrap script, which is like this script but with
316 extend_parser, adjust_options, and after_install hooks.
318 This returns a string that (written to disk of course) can be used
319 as a bootstrap script with your own customizations. The script
320 will be the standard virtualenv.py script, with your extra text
321 added (your extra text should be Python code).
323 If you include these functions, they will be called:
325 ``extend_parser(optparse_parser)``:
326 You can add or remove options from the parser here.
328 ``adjust_options(options, args)``:
329 You can change options here, or change the args (if you accept
330 different kinds of arguments, be sure you modify ``args`` so it is
331 only ``[DEST_DIR]``).
333 ``after_install(options, home_dir)``:
335 After everything is installed, this function is called. This
336 is probably the function you are most likely to use. An
339 def after_install(options, home_dir):
340 if sys.platform == 'win32':
344 subprocess.call([join(home_dir, bin, 'easy_install'),
346 subprocess.call([join(home_dir, bin, 'my-package-script'),
349 This example immediately installs a package, and runs a setup
350 script from that package.
355 Here's a more concrete example of how you could use this::
357 import virtualenv, textwrap
358 output = virtualenv.create_bootstrap_script(textwrap.dedent("""
359 import os, subprocess
360 def after_install(options, home_dir):
361 etc = join(home_dir, 'etc')
362 if not os.path.exists(etc):
364 subprocess.call([join(home_dir, 'bin', 'easy_install'),
366 subprocess.call([join(home_dir, 'bin', 'paster'),
367 'make-config', 'BlogApplication',
368 join(etc, 'blog.ini')])
369 subprocess.call([join(home_dir, 'bin', 'paster'),
370 'setup-app', join(etc, 'blog.ini')])
372 f = open('blog-bootstrap.py', 'w').write(output)
374 Another example is available `here
375 <https://github.com/socialplanning/fassembler/blob/master/fassembler/create-venv-script.py>`_.
378 Using Virtualenv without ``bin/python``
379 ---------------------------------------
381 Sometimes you can't or don't want to use the Python interpreter
382 created by the virtualenv. For instance, in a `mod_python
383 <http://www.modpython.org/>`_ or `mod_wsgi <http://www.modwsgi.org/>`_
384 environment, there is only one interpreter.
386 Luckily, it's easy. You must use the custom Python interpreter to
387 *install* libraries. But to *use* libraries, you just have to be sure
388 the path is correct. A script is available to correct the path. You
389 can setup the environment like::
391 activate_this = '/path/to/env/bin/activate_this.py'
392 execfile(activate_this, dict(__file__=activate_this))
394 This will change ``sys.path`` and even change ``sys.prefix``, but also allow
395 you to use an existing interpreter. Items in your environment will show up
396 first on ``sys.path``, before global items. However, global items will
397 always be accessible (as if the ``--system-site-packages`` flag had been used
398 in creating the environment, whether it was or not). Also, this cannot undo
399 the activation of other environments, or modules that have been imported.
400 You shouldn't try to, for instance, activate an environment before a web
401 request; you should activate *one* environment as early as possible, and not
402 do it again in that process.
404 Making Environments Relocatable
405 -------------------------------
407 Note: this option is somewhat experimental, and there are probably
408 caveats that have not yet been identified.
412 The ``--relocatable`` option currently has a number of issues,
413 and is not guaranteed to work in all circumstances. It is possible
414 that the option will be deprecated in a future version of ``virtualenv``.
416 Normally environments are tied to a specific path. That means that
417 you cannot move an environment around or copy it to another computer.
418 You can fix up an environment to make it relocatable with the
421 $ virtualenv --relocatable ENV
423 This will make some of the files created by setuptools use relative paths,
424 and will change all the scripts to use ``activate_this.py`` instead of using
425 the location of the Python interpreter to select the environment.
427 **Note:** scripts which have been made relocatable will only work if
428 the virtualenv is activated, specifically the python executable from
429 the virtualenv must be the first one on the system PATH. Also note that
430 the activate scripts are not currently made relocatable by
431 ``virtualenv --relocatable``.
433 **Note:** you must run this after you've installed *any* packages into
434 the environment. If you make an environment relocatable, then
435 install a new package, you must run ``virtualenv --relocatable``
438 Also, this **does not make your packages cross-platform**. You can
439 move the directory around, but it can only be used on other similar
440 computers. Some known environmental differences that can cause
441 incompatibilities: a different version of Python, when one platform
442 uses UCS2 for its internal unicode representation and another uses
443 UCS4 (a compile-time option), obvious platform changes like Windows
444 vs. Linux, or Intel vs. ARM, and if you have libraries that bind to C
445 libraries on the system, if those C libraries are located somewhere
446 different (either different versions, or a different filesystem
449 If you use this flag to create an environment, currently, the
450 ``--system-site-packages`` option will be implied.
452 The ``--extra-search-dir`` option
453 ---------------------------------
457 Currently, this feature only partially works for pip, and not at
458 all for setuptools. For details,
459 see `Issue #327 <https://github.com/pypa/virtualenv/issues/327>`_
461 This option allows you to provide your own versions of setuptools
462 and/or pip on the filesystem, and tell virtualenv to use those distributions
463 instead of the ones in ``virtualenv_support``.
465 To use this feature, pass one or more ``--extra-search-dir`` options to
466 virtualenv like this::
468 $ virtualenv --extra-search-dir=/path/to/distributions ENV
470 The ``/path/to/distributions`` path should point to a directory that
471 contains setuptools and/or pip distributions. Setuptools distributions
472 must be ``.egg`` files; pip distributions should be `.tar.gz` source
475 If no satisfactory local distributions are found, virtualenv will fail. Virtualenv will never download packages.
477 The distribution lookup is done in the following locations, with the most
478 recent version found used:
480 #. The current directory.
481 #. The directory where virtualenv.py is located.
482 #. A ``virtualenv_support`` directory relative to the directory where
483 virtualenv.py is located.
484 #. If the file being executed is not named virtualenv.py (i.e. is a boot
485 script), a ``virtualenv_support`` directory relative to wherever
486 virtualenv.py is actually installed.
489 Compare & Contrast with Alternatives
490 ------------------------------------
492 There are several alternatives that create isolated environments:
494 * ``workingenv`` (which I do not suggest you use anymore) is the
495 predecessor to this library. It used the main Python interpreter,
496 but relied on setting ``$PYTHONPATH`` to activate the environment.
497 This causes problems when running Python scripts that aren't part of
498 the environment (e.g., a globally installed ``hg`` or ``bzr``). It
499 also conflicted a lot with Setuptools.
502 <http://peak.telecommunity.com/DevCenter/EasyInstall#creating-a-virtual-python>`_
503 is also a predecessor to this library. It uses only symlinks, so it
504 couldn't work on Windows. It also symlinks over the *entire*
505 standard library and global ``site-packages``. As a result, it
506 won't see new additions to the global ``site-packages``.
508 This script only symlinks a small portion of the standard library
509 into the environment, and so on Windows it is feasible to simply
510 copy these files over. Also, it creates a new/empty
511 ``site-packages`` and also adds the global ``site-packages`` to the
512 path, so updates are tracked separately. This script also installs
513 Setuptools automatically, saving a step and avoiding the need for
516 * `zc.buildout <http://pypi.python.org/pypi/zc.buildout>`_ doesn't
517 create an isolated Python environment in the same style, but
518 achieves similar results through a declarative config file that sets
519 up scripts with very particular packages. As a declarative system,
520 it is somewhat easier to repeat and manage, but more difficult to
521 experiment with. ``zc.buildout`` includes the ability to setup
522 non-Python systems (e.g., a database server or an Apache instance).
524 I *strongly* recommend anyone doing application development or
525 deployment use one of these tools.
530 Refer to the `contributing to pip`_ documentation - it applies equally to
531 virtualenv, except that virtualenv issues should filed on the `virtualenv
534 Virtualenv's release schedule is tied to pip's -- each time there's a new pip
535 release, there will be a new virtualenv release that bundles the new version of
538 Files in the `virtualenv_embedded/` subdirectory are embedded into
539 `virtualenv.py` itself as base64-encoded strings (in order to support
540 single-file use of `virtualenv.py` without installing it). If your patch
541 changes any file in `virtualenv_embedded/`, run `bin/rebuild-script.py` to
542 update the embedded version of that file in `virtualenv.py`; commit that and
543 submit it as part of your patch / pull request.
545 .. _contributing to pip: http://www.pip-installer.org/en/latest/contributing.html
546 .. _virtualenv repo: https://github.com/pypa/virtualenv/
551 Virtualenv's test suite is small and not yet at all comprehensive, but we aim
554 The easy way to run tests (handles test dependencies automatically)::
556 $ python setup.py test
558 If you want to run only a selection of the tests, you'll need to run them
559 directly with nose instead. Create a virtualenv, and install required
562 $ pip install nose mock
568 Or select just a single test file to run::
570 $ nosetests tests.test_virtualenv
573 Other Documentation and Links
574 -----------------------------
576 * James Gardner has written a tutorial on using `virtualenv with
578 <http://wiki.pylonshq.com/display/pylonscookbook/Using+a+Virtualenv+Sandbox>`_.
581 <http://blog.ianbicking.org/2007/10/10/workingenv-is-dead-long-live-virtualenv/>`_.
583 * Doug Hellmann wrote a description of his `command-line work flow
584 using virtualenv (virtualenvwrapper)
585 <http://www.doughellmann.com/articles/CompletelyDifferent-2008-05-virtualenvwrapper/index.html>`_
586 including some handy scripts to make working with multiple
587 environments easier. He also wrote `an example of using virtualenv
589 <http://www.doughellmann.com/articles/CompletelyDifferent-2008-02-ipython-and-virtualenv/index.html>`_.
591 * Chris Perkins created a `showmedo video including virtualenv
592 <http://showmedo.com/videos/video?name=2910000&fromSeriesID=291>`_.
594 * `Using virtualenv with mod_wsgi
595 <http://code.google.com/p/modwsgi/wiki/VirtualEnvironments>`_.
597 * `virtualenv commands
598 <https://github.com/thisismedium/virtualenv-commands>`_ for some more
599 workflow-related tools around virtualenv.
604 ``virtualenv`` is a successor to `workingenv
605 <http://cheeseshop.python.org/pypi/workingenv.py>`_, and an extension
607 <http://peak.telecommunity.com/DevCenter/EasyInstall#creating-a-virtual-python>`_.
609 It was written by Ian Bicking, sponsored by the `Open Planning
610 Project <http://openplans.org>`_ and is now maintained by a
611 `group of developers <https://github.com/pypa/virtualenv/raw/master/AUTHORS.txt>`_.
612 It is licensed under an
613 `MIT-style permissive license <https://github.com/pypa/virtualenv/raw/master/LICENSE.txt>`_.
620 Python bugfix releases 2.6.8, 2.7.3, 3.1.5 and 3.2.3 include a change that
621 will cause "import random" to fail with "cannot import name urandom" on any
622 virtualenv created on a Unix host with an earlier release of Python
623 2.6/2.7/3.1/3.2, if the underlying system Python is upgraded. This is due to
624 the fact that a virtualenv uses the system Python's standard library but
625 contains its own copy of the Python interpreter, so an upgrade to the system
626 Python results in a mismatch between the version of the Python interpreter
627 and the version of the standard library. It can be fixed by removing
628 ``$ENV/bin/python`` and re-running virtualenv on the same target directory
629 with the upgraded Python.
634 * **New Signing Key** Release 1.10.1 is using a different key than normal with
635 fingerprint: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
636 * Upgraded pip to v1.4.1
637 * Upgraded setuptools to v0.9.8
643 * **BACKWARDS INCOMPATIBLE** Dropped support for Python 2.5. The minimum
644 supported Python version is now Python 2.6.
646 * **BACKWARDS INCOMPATIBLE** Using ``virtualenv.py`` as an isolated script
647 (i.e. without an associated ``virtualenv_support`` directory) is no longer
648 supported for security reasons and will fail with an error.
650 Along with this, ``--never-download`` is now always pinned to ``True``, and
651 is only being maintained in the short term for backward compatibility
654 * **IMPORTANT** Switched to the new setuptools (v0.9.7) which has been merged
655 with Distribute_ again and works for Python 2 and 3 with one codebase.
656 The ``--distribute`` and ``--setuptools`` options are now no-op.
658 * Updated to pip 1.4.
660 * Added support for PyPy3k
662 * Added the option to use a version number with the ``-p`` option to get the
663 system copy of that Python version (Windows only)
665 * Removed embedded ``ez_setup.py``, ``distribute_setup.py`` and
666 ``distribute_from_egg.py`` files as part of switching to merged setuptools.
668 * Fixed ``--relocatable`` to work better on Windows.
670 * Fixed issue with readline on Windows.
672 .. _Distribute: https://pypi.python.org/pypi/distribute
677 * Updated to pip 1.3.1 that fixed a major backward incompatible change of
678 parsing URLs to externally hosted packages that got accidentily included
684 * Unset VIRTUAL_ENV environment variable in deactivate.bat (Pull #364)
685 * Upgraded distribute to 0.6.34.
686 * Added ``--no-setuptools`` and ``--no-pip`` options (Pull #336).
687 * Fixed Issue #373. virtualenv-1.8.4 was failing in cygwin (Pull #382).
688 * Fixed Issue #378. virtualenv is now "multiarch" aware on debian/ubuntu (Pull #379).
689 * Fixed issue with readline module path on pypy and OSX (Pull #374).
690 * Made 64bit detection compatible with Python 2.5 (Pull #393).
696 * Updated distribute to 0.6.31. This fixes #359 (numpy install regression) on
697 UTF-8 platforms, and provides a workaround on other platforms:
698 ``PYTHONIOENCODING=utf8 pip install numpy``.
700 * When installing virtualenv via curl, don't forget to filter out arguments
701 the distribute setup script won't understand. Fixes #358.
703 * Added some more integration tests.
705 * Removed the unsupported embedded setuptools egg for Python 2.4 to reduce
711 * Fixed readline on OS X. Thanks minrk
713 * Updated distribute to 0.6.30 (improves our error reporting, plus new
714 distribute features and fixes). Thanks Gabriel (g2p)
716 * Added compatibility with multiarch Python (Python 3.3 for example). Added an
717 integration test. Thanks Gabriel (g2p)
719 * Added ability to install distribute from a user-provided egg, rather than the
720 bundled sdist, for better speed. Thanks Paul Moore.
722 * Make the creation of lib64 symlink smarter about already-existing symlink,
723 and more explicit about full paths. Fixes #334 and #330. Thanks Jeremy Orem.
725 * Give lib64 site-dir preference over lib on 64-bit systems, to avoid wrong
726 32-bit compiles in the venv. Fixes #328. Thanks Damien Nozay.
728 * Fix a bug with prompt-handling in ``activate.csh`` in non-interactive csh
729 shells. Fixes #332. Thanks Benjamin Root for report and patch.
731 * Make it possible to create a virtualenv from within a Python
732 3.3. pyvenv. Thanks Chris McDonough for the report.
734 * Add optional --setuptools option to be able to switch to it in case
735 distribute is the default (like in Debian).
740 * Updated the included pip version to 1.2.1 to fix regressions introduced
747 * Fixed distribute version used with `--never-download`. Thanks michr for
750 * Fix creating Python 3.3 based virtualenvs by unsetting the
751 ``__PYVENV_LAUNCHER__`` environment variable in subprocesses.
757 * **Dropped support for Python 2.4** The minimum supported Python version is
760 * Fix `--relocatable` on systems that use lib64. Fixes #78. Thanks Branden
763 * Symlink some additional modules under Python 3. Fixes #194. Thanks Vinay
764 Sajip, Ian Clelland, and Stefan Holek for the report.
766 * Fix ``--relocatable`` when a script uses ``__future__`` imports. Thanks
769 * Fix a bug in the config option parser that prevented setting negative
770 options with environemnt variables. Thanks Ralf Schmitt.
772 * Allow setting ``--no-site-packages`` from the config file.
774 * Use ``/usr/bin/multiarch-platform`` if available to figure out the include
775 directory. Thanks for the patch, Mika Laitio.
777 * Fix ``install_name_tool`` replacement to work on Python 3.X.
779 * Handle paths of users' site-packages on Mac OS X correctly when changing
782 * Updated the embedded version of distribute to 0.6.28 and pip to 1.2.
788 * Updated to distribute 0.6.27.
790 * Fix activate.fish on OS X. Fixes #8. Thanks David Schoonover.
792 * Create a virtualenv-x.x script with the Python version when installing, so
793 virtualenv for multiple Python versions can be installed to the same
794 script location. Thanks Miki Tebeka.
796 * Restored ability to create a virtualenv with a path longer than 78
797 characters, without breaking creation of virtualenvs with non-ASCII paths.
798 Thanks, Bradley Ayers.
800 * Added ability to create virtualenvs without having installed Apple's
801 developers tools (using an own implementation of ``install_name_tool``).
804 * Fixed PyPy and Jython support on Windows. Thanks Konstantin Zemlyak.
806 * Added pydoc script to ease use. Thanks Marc Abramowitz. Fixes #149.
808 * Fixed creating a bootstrap script on Python 3. Thanks Raul Leal. Fixes #280.
810 * Fixed inconsistency when having set the ``PYTHONDONTWRITEBYTECODE`` env var
811 with the --distribute option or the ``VIRTUALENV_USE_DISTRIBUTE`` env var.
812 ``VIRTUALENV_USE_DISTRIBUTE`` is now considered again as a legacy alias.
818 * Fixed minor issue in `--relocatable`. Thanks, Cap Petschulat.
824 * Bumped the version string in ``virtualenv.py`` up, too.
826 * Fixed rST rendering bug of long description.
832 * Update embedded pip to version 1.1.
834 * Fix `--relocatable` under Python 3. Thanks Doug Hellmann.
836 * Added environ PATH modification to activate_this.py. Thanks Doug
837 Napoleone. Fixes #14.
839 * Support creating virtualenvs directly from a Python build directory on
840 Windows. Thanks CBWhiz. Fixes #139.
842 * Use non-recursive symlinks to fix things up for posix_local install
843 scheme. Thanks michr.
845 * Made activate script available for use with msys and cygwin on Windows.
846 Thanks Greg Haskins, Cliff Xuan, Jonathan Griffin and Doug Napoleone.
849 * Fixed creation of virtualenvs on Windows when Python is not installed for
850 all users. Thanks Anatoly Techtonik for report and patch and Doug
851 Napoleone for testing and confirmation. Fixes #87.
853 * Fixed creation of virtualenvs using -p in installs where some modules
854 that ought to be in the standard library (e.g. `readline`) are actually
855 installed in `site-packages` next to `virtualenv.py`. Thanks Greg Haskins
856 for report and fix. Fixes #167.
858 * Added activation script for Powershell (signed by Jannis Leidel). Many
859 thanks to Jason R. Coombs.
865 * Gave user-provided ``--extra-search-dir`` priority over default dirs for
866 finding setuptools/distribute (it already had priority for finding pip).
869 * Updated embedded Distribute release to 0.6.24. Thanks Alex Gronholm.
871 * Made ``--no-site-packages`` behavior the default behavior. The
872 ``--no-site-packages`` flag is still permitted, but displays a warning when
873 used. Thanks Chris McDonough.
875 * New flag: ``--system-site-packages``; this flag should be passed to get the
876 previous default global-site-package-including behavior back.
878 * Added ability to set command options as environment variables and options
879 in a ``virtualenv.ini`` file.
881 * Fixed various encoding related issues with paths. Thanks Gunnlaugur Thor Briem.
883 * Made ``virtualenv.py`` script executable.
889 * Restored ability to run on Python 2.4, too.
895 * Restored ability to run on Python < 2.7.
901 * Updated embedded distribute release to 0.6.19.
903 * Updated embedded pip release to 1.0.2.
905 * Fixed #141 - Be smarter about finding pkg_resources when using the
906 non-default Python intepreter (by using the ``-p`` option).
908 * Fixed #112 - Fixed path in docs.
910 * Fixed #109 - Corrected doctests of a Logger method.
912 * Fixed #118 - Fixed creating virtualenvs on platforms that use the
913 "posix_local" install scheme, such as Ubuntu with Python 2.7.
915 * Add missing library to Python 3 virtualenvs (``_dummy_thread``).
921 * Start to use git-flow.
923 * Added support for PyPy 1.5
925 * Fixed #121 -- added sanity-checking of the -p argument. Thanks Paul Nasrat.
927 * Added progress meter for pip installation as well as setuptools. Thanks Ethan
930 * Added --never-download and --search-dir options. Thanks Ethan Jucovy.
936 * Added Python 3 support! Huge thanks to Vinay Sajip and Vitaly Babiy.
938 * Fixed creation of virtualenvs on Mac OS X when standard library modules
939 (readline) are installed outside the standard library.
941 * Updated bundled pip to 1.0.
947 * Moved main repository to Github: https://github.com/pypa/virtualenv
949 * Transferred primary maintenance from Ian to Jannis Leidel, Carl Meyer and Brian Rosner
951 * Fixed a few more pypy related bugs.
953 * Updated bundled pip to 0.8.2.
955 * Handed project over to new team of maintainers.
957 * Moved virtualenv to Github at https://github.com/pypa/virtualenv
963 * Added ``_weakrefset`` requirement for Python 2.7.1.
965 * Fixed Windows regression in 1.5
973 * Add support for PyPy.
975 * Uses a proper temporary dir when installing environment requirements.
977 * Add ``--prompt`` option to be able to override the default prompt prefix.
979 * Fix an issue with ``--relocatable`` on Windows.
981 * Fix issue with installing the wrong version of distribute.
983 * Add fish and csh activate scripts.
995 * Fix for Mac OS X Framework builds that use
996 ``--universal-archs=intel``
998 * Fix ``activate_this.py`` on Windows.
1000 * Allow ``$PYTHONHOME`` to be set, so long as you use ``source
1001 bin/activate`` it will get unset; if you leave it set and do not
1002 activate the environment it will still break the environment.
1016 * Allow ``activate.sh`` to skip updating the prompt (by setting
1017 ``$VIRTUAL_ENV_DISABLE_PROMPT``).
1025 * Fix ``activate.bat`` and ``deactivate.bat`` under Windows when
1026 ``PATH`` contained a parenthesis
1032 * Include pip 0.6.2 and Distribute 0.6.10
1034 * Create the ``virtualenv`` script even when Setuptools isn't
1037 * Fix problem with ``virtualenv --relocate`` when ``bin/`` has
1038 subdirectories (e.g., ``bin/.svn/``); from Alan Franzoni.
1040 * If you set ``$VIRTUALENV_DISTRIBUTE`` then virtualenv will use
1041 Distribute by default (so you don't have to remember to use
1054 * Fix pip installation on Windows
1056 * Fix use of stand-alone ``virtualenv.py`` (and boot scripts)
1058 * Exclude ~/.local (user site-packages) from environments when using
1059 ``--no-site-packages``
1071 * Updated setuptools to 0.6c11
1073 * Added the --distribute option
1075 * Fixed packaging problem of support-files
1081 * Virtualenv now copies the actual embedded Python binary on
1082 Mac OS X to fix a hang on Snow Leopard (10.6).
1084 * Fail more gracefully on Windows when ``win32api`` is not installed.
1086 * Fix site-packages taking precedent over Jython's ``__classpath__``
1087 and also specially handle the new ``__pyclasspath__`` entry in
1090 * Now copies Jython's ``registry`` file to the virtualenv if it exists.
1092 * Better find libraries when compiling extensions on Windows.
1094 * Create ``Scripts\pythonw.exe`` on Windows.
1096 * Added support for the Debian/Ubuntu
1097 ``/usr/lib/pythonX.Y/dist-packages`` directory.
1099 * Set ``distutils.sysconfig.get_config_vars()['LIBDIR']`` (based on
1100 ``sys.real_prefix``) which is reported to help building on Windows.
1102 * Make ``deactivate`` work on ksh
1104 * Fixes for ``--python``: make it work with ``--relocatable`` and the
1105 symlink created to the exact Python version.
1111 * Use Windows newlines in ``activate.bat``, which has been reported to help
1112 when using non-ASCII directory names.
1114 * Fixed compatibility with Jython 2.5b1.
1116 * Added a function ``virtualenv.install_python`` for more fine-grained
1117 access to what ``virtualenv.create_environment`` does.
1119 * Fix `a problem <https://bugs.launchpad.net/virtualenv/+bug/241581>`_
1120 with Windows and paths that contain spaces.
1122 * If ``/path/to/env/.pydistutils.cfg`` exists (or
1123 ``/path/to/env/pydistutils.cfg`` on Windows systems) then ignore
1124 ``~/.pydistutils.cfg`` and use that other file instead.
1127 <https://bugs.launchpad.net/virtualenv/+bug/340050>`_ picking up
1128 some ``.so`` libraries in ``/usr/local``.
1134 * Remove the ``[install] prefix = ...`` setting from the virtualenv
1135 ``distutils.cfg`` -- this has been causing problems for a lot of
1136 people, in rather obscure ways.
1138 * If you use a boot script it will attempt to import ``virtualenv``
1139 and find a pre-downloaded Setuptools egg using that.
1141 * Added platform-specific paths, like ``/usr/lib/pythonX.Y/plat-linux2``
1147 * Real Python 2.6 compatibility. Backported the Python 2.6 updates to
1148 ``site.py``, including `user directories
1149 <http://docs.python.org/dev/whatsnew/2.6.html#pep-370-per-user-site-packages-directory>`_
1150 (this means older versions of Python will support user directories,
1151 whether intended or not).
1153 * Always set ``[install] prefix`` in ``distutils.cfg`` -- previously
1154 on some platforms where a system-wide ``distutils.cfg`` was present
1155 with a ``prefix`` setting, packages would be installed globally
1156 (usually in ``/usr/local/lib/pythonX.Y/site-packages``).
1158 * Sometimes Cygwin seems to leave ``.exe`` off ``sys.executable``; a
1159 workaround is added.
1161 * Fix ``--python`` option.
1163 * Fixed handling of Jython environments that use a
1164 jython-complete.jar.
1170 * Update to Setuptools 0.6c9
1171 * Added an option ``virtualenv --relocatable EXISTING_ENV``, which
1172 will make an existing environment "relocatable" -- the paths will
1173 not be absolute in scripts, ``.egg-info`` and ``.pth`` files. This
1174 may assist in building environments that can be moved and copied.
1175 You have to run this *after* any new packages installed.
1176 * Added ``bin/activate_this.py``, a file you can use like
1177 ``execfile("path_to/activate_this.py",
1178 dict(__file__="path_to/activate_this.py"))`` -- this will activate
1179 the environment in place, similar to what `the mod_wsgi example
1180 does <http://code.google.com/p/modwsgi/wiki/VirtualEnvironments>`_.
1181 * For Mac framework builds of Python, the site-packages directory
1182 ``/Library/Python/X.Y/site-packages`` is added to ``sys.path``, from
1184 * Some platform-specific modules in Macs are added to the path now
1185 (``plat-darwin/``, ``plat-mac/``, ``plat-mac/lib-scriptpackages``),
1187 * Fixed a small Bashism in the ``bin/activate`` shell script.
1188 * Added ``__future__`` to the list of required modules, for Python
1189 2.3. You'll still need to backport your own ``subprocess`` module.
1190 * Fixed the ``__classpath__`` entry in Jython's ``sys.path`` taking
1191 precedent over virtualenv's libs.
1197 * Added a ``--python`` option to select the Python interpreter.
1198 * Add ``warnings`` to the modules copied over, for Python 2.6 support.
1199 * Add ``sets`` to the module copied over for Python 2.3 (though Python
1200 2.3 still probably doesn't work).
1206 * Added support for Jython 2.5.
1212 * Added support for Python 2.6.
1213 * Fix a problem with missing ``DLLs/zlib.pyd`` on Windows. Create
1214 * ``bin/python`` (or ``bin/python.exe``) even when you run virtualenv
1215 with an interpreter named, e.g., ``python2.4``
1216 * Fix MacPorts Python
1217 * Added --unzip-setuptools option
1218 * Update to Setuptools 0.6c8
1219 * If the current directory is not writable, run ez_setup.py in ``/tmp``
1220 * Copy or symlink over the ``include`` directory so that packages will
1221 more consistently compile.
1227 * Fix build on systems that use ``/usr/lib64``, distinct from
1228 ``/usr/lib`` (specifically CentOS x64).
1229 * Fixed bug in ``--clear``.
1230 * Fixed typos in ``deactivate.bat``.
1231 * Preserve ``$PYTHONPATH`` when calling subprocesses.
1237 * Fix include dir copying on Windows (makes compiling possible).
1238 * Include the main ``lib-tk`` in the path.
1239 * Patch ``distutils.sysconfig``: ``get_python_inc`` and
1240 ``get_python_lib`` to point to the global locations.
1241 * Install ``distutils.cfg`` before Setuptools, so that system
1242 customizations of ``distutils.cfg`` won't effect the installation.
1243 * Add ``bin/pythonX.Y`` to the virtualenv (in addition to
1245 * Fixed an issue with Mac Framework Python builds, and absolute paths
1246 (from Ronald Oussoren).
1252 * Improve ability to create a virtualenv from inside a virtualenv.
1253 * Fix a little bug in ``bin/activate``.
1254 * Actually get ``distutils.cfg`` to work reliably.
1260 * Added ``lib-dynload`` and ``config`` to things that need to be
1261 copied over in an environment.
1262 * Copy over or symlink the ``include`` directory, so that you can
1263 build packages that need the C headers.
1264 * Include a ``distutils`` package, so you can locally update
1265 ``distutils.cfg`` (in ``lib/pythonX.Y/distutils/distutils.cfg``).
1266 * Better avoid downloading Setuptools, and hitting PyPI on environment
1268 * Fix a problem creating a ``lib64/`` directory.
1269 * Should work on MacOSX Framework builds (the default Python
1270 installations on Mac). Thanks to Ronald Oussoren.
1276 * Windows installs would sometimes give errors about ``sys.prefix`` that
1278 * Slightly prettier output.
1284 * Added support for Windows.
1290 * Give a better warning if you are on an unsupported platform (Mac
1291 Framework Pythons, and Windows).
1292 * Give error about running while inside a workingenv.
1293 * Give better error message about Python 2.3.
1299 Fixed packaging of the library.
1305 Initial release. Everything is changed and new!
1307 Keywords: setuptools deployment installation distutils
1309 Classifier: Development Status :: 5 - Production/Stable
1310 Classifier: Intended Audience :: Developers
1311 Classifier: License :: OSI Approved :: MIT License
1312 Classifier: Programming Language :: Python :: 2
1313 Classifier: Programming Language :: Python :: 2.5
1314 Classifier: Programming Language :: Python :: 2.6
1315 Classifier: Programming Language :: Python :: 2.7
1316 Classifier: Programming Language :: Python :: 3
1317 Classifier: Programming Language :: Python :: 3.1
1318 Classifier: Programming Language :: Python :: 3.2