From e4e626cb3aaf69173e9fd0e63ed852a12e050925 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Wed, 13 Sep 2017 10:23:01 -0400 Subject: [PATCH] specifying versions of python Signed-off-by: Kenneth Reitz --- docs/advanced.rst | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/advanced.rst b/docs/advanced.rst index faf6f7c3..79e98da8 100644 --- a/docs/advanced.rst +++ b/docs/advanced.rst @@ -115,8 +115,8 @@ pipenv will automatically import the contents of this file and create a ``Pipfil .. _specifying_versions: -☤ Specifying Versions ---------------------- +☤ Specifying Versions of a Package +---------------------------------- To tell pipenv to install a specific version of a library, the usage is simple:: @@ -125,6 +125,22 @@ To tell pipenv to install a specific version of a library, the usage is simple:: This will update your ``Pipfile`` to reflect this requirement, automatically. +☤ Specifying Versions of Python +------------------------------- + +To create a new virtualenv, using a specific version of Python you have installed (and +on your ``PATH``), use the ``--python VERSION`` flag, like so: + +Use Python 3.6:: + + $ pipenv --python 3.6 + +Use Python 2.7:: + + $ pipenv --python 2.7 + +If you don't specify a Python version, either the ``[requires]`` ``python_version`` will be selected, or +whatever your system's default Python installation is, at time of execution. .. _proper_installation: