From bb5b1e60da2bc5ac29b80327fd92aef1a439f633 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Sat, 3 Oct 2015 19:00:09 +0100 Subject: [PATCH 1/2] Add information on pyenv --- docs/dev/env.rst | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/docs/dev/env.rst b/docs/dev/env.rst index dae86e4..ec8a803 100644 --- a/docs/dev/env.rst +++ b/docs/dev/env.rst @@ -232,7 +232,32 @@ For example, you can work on a project which requires Django 1.3 while also maintaining a project which requires Django 1.0. To start using and see more information: -`Virtual Environments `_ docs. +`Virtual Environments `_ docs. + + +pyenv +----- + +`pyenv `_ is a tool to allow multiple versions +of the Python interpreter to be installed at the same time. This solves the +problem of having different projects requiring different versions of Python. +For example, it becomes very easy to install Python 2.7 for compatibility in +an one project, whilst still using Python 3.4 as the default interpreter. +pyenv isn't just limited to the CPython versions - it will also install PyPy, +anaconda, miniconda, stackless, jython, and ironpython interpreters. + +pyenv works by filling a ``shims`` directory with fake versions of the Python +interpreter (plus other tools like ``pip`` and ``2to3``). When the system +looks for a program named ``python``, it looks inside the ``shims`` directory +first, and uses the fake version, which in turn passes the command on to +pyenv. pyenv then works out which version of Python should be run based on +environment variables, ``.python-version`` files, and the global default. + +pyenv isn't a tool for managing virtual environments, but there is a plugin +`pyenv-virtualenv `_ which automates +the creation of different environments, and also makes it possible to use the +existing pyenv tools to switch to different environments based on environment +variables or ``.python-version`` files. Other Tools ::::::::::: From 766c5d4a551e686c2c7c282574c6a290caf5e794 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Sat, 3 Oct 2015 20:16:17 +0100 Subject: [PATCH 2/2] Sounds more gramatically correct --- docs/dev/env.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dev/env.rst b/docs/dev/env.rst index ec8a803..ebe6e48 100644 --- a/docs/dev/env.rst +++ b/docs/dev/env.rst @@ -253,7 +253,7 @@ first, and uses the fake version, which in turn passes the command on to pyenv. pyenv then works out which version of Python should be run based on environment variables, ``.python-version`` files, and the global default. -pyenv isn't a tool for managing virtual environments, but there is a plugin +pyenv isn't a tool for managing virtual environments, but there is the plugin `pyenv-virtualenv `_ which automates the creation of different environments, and also makes it possible to use the existing pyenv tools to switch to different environments based on environment