@@ -137,14 +137,45 @@ Topics <additional>` section.
137137Installing from PyPI
138138====================
139139
140- Install `SomeProject ` and its dependencies from :term: `PyPI <Python Package
141- Index (PyPI)> ` using :ref: `pip:Requirement Specifiers `
140+ The most common usage of :ref: `pip ` is to install from the :term: `Python Package
141+ Index <Python Package Index (PyPI)> ` using a :term: `requirement specifier
142+ <Requirement Specifier> `. Generally speaking, a requirement specifier is
143+ composed of a project name followed by an optional :term: `version specifier
144+ <Version Specifier> `. :ref: `PEP440 <pypa:PEP440s >` contains a `full
145+ specification <https://www.python.org/dev/peps/pep-0440/#version-specifiers> `_
146+ of the currently supported specifiers. Below are some examples.
147+
148+ To install the latest version of "SomeProject":
142149
143150::
144151
145- pip install SomeProject # latest version
146- pip install SomeProject==1.0.4 # specific version
147- pip install 'SomeProject>=1.0.4' # minimum version
152+ pip install 'SomeProject'
153+
154+
155+ To install a specific version:
156+
157+ ::
158+
159+ pip install 'SomeProject==1.4'
160+
161+
162+ To install greater than or equal to one version and less than another:
163+
164+ ::
165+
166+ pip install 'SomeProject>=1,<2'
167+
168+
169+ To install a version that's `"compatible"
170+ <https://www.python.org/dev/peps/pep-0440/#compatible-release> `_ with a certain
171+ version: [5 ]_
172+
173+ ::
174+
175+ pip install 'SomeProject~=1.4.2'
176+
177+ In this case, this means to install any version "==1.4.*" version that's also
178+ ">=1.4.2".
148179
149180
150181Upgrading packages
@@ -337,7 +368,9 @@ Install `setuptools extras`_.
337368 pre-installed, thereby making it an equal alternative to
338369 :ref: `virtualenv `.
339370
340- .. [5 ]
371+ .. [5 ] The compatible release specifier was accepted in :ref: `PEP440
372+ <pypa:PEP440s>` and support was released in :ref: `setuptools ` v8.0 and
373+ :ref: `pip ` v6.0
341374
342375 .. _pyvenv : http://docs.python.org/3.4/library/venv.html
343376.. _setuptools extras : http://packages.python.org/setuptools/setuptools.html#declaring-extras-optional-features-with-their-own-dependencies
0 commit comments