You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/basics.rst
+28-3
Original file line number
Diff line number
Diff line change
@@ -182,13 +182,38 @@ in your ``Pipfile.lock`` for now, run ``pipenv lock --keep-outdated``. Make sur
182
182
☤ Specifying Versions of a Package
183
183
----------------------------------
184
184
185
-
To tell pipenv to install a specific version of a library, the usage is simple::
185
+
You can specify versions of a package using the `Semantic Versioning scheme <https://semver.org/>`_
186
+
(i.e. ``major.minor.micro``).
186
187
187
-
$ pipenv install requests==2.13.0
188
+
For example, to install requests you can use: ::
189
+
190
+
$ pipenv install requests~=1.2 # equivalent to requests~=1.2.0
191
+
192
+
Pipenv will install version ``1.2`` and any minor update, but not ``2.0``.
188
193
189
194
This will update your ``Pipfile`` to reflect this requirement, automatically.
190
195
191
-
For other version specifiers, see `the relevant section of PEP-440`_.
196
+
In general, Pipenv uses the same specifier format as pip. However, note that according to `PEP 440`_ , you can't use versions containing a hyphen or a plus sign.
0 commit comments