-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve installation documentation #1707
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Document requirements (pip + index server) when installing via pip under the installation section - by | ||
:user:`gaborbernat`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Document installing from non PEP-518 systems - :user:`gaborbernat`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Document installing latest unreleased version from Github - :user:`gaborbernat`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,13 +19,31 @@ via pip | |
Alternatively you can install it within the global Python interpreter itself (perhaps as a user package via the | ||
``--user`` flag). Be cautious if you are using a python install that is managed by your operating system or | ||
another package manager. ``pip`` might not coordinate with those tools, and may leave your system in an | ||
inconsistent state. | ||
inconsistent state. Note, if you go down this path you need to ensure pip is new enough per the subsections below: | ||
|
||
.. code-block:: console | ||
|
||
python -m pip install --user virtualenv | ||
python -m virtualenv --help | ||
|
||
wheel | ||
~~~~~ | ||
Installing virtualenv via a wheel (default with pip) requires an installer that can understand the ``python-requires`` | ||
tag (see `PEP-503 <https://www.python.org/dev/peps/pep-0503/>`_), with pip this is version ``9.0.0`` (released 2016 | ||
November). Furthermore, in case you're not installing it via the PyPi you need to be using a mirror that correctly | ||
forwards the ``python-requires`` tag (notably the OpenStack mirrors don't do this, or older | ||
`devpi <https://github.com/devpi/devpi>`_ versions - added with version ``4.7.0``). | ||
|
||
.. _sdist: | ||
|
||
sdist | ||
~~~~~ | ||
When installing via a source distribution you need an installer that handles the | ||
`PEP-517 <https://www.python.org/dev/peps/pep-0517/>`_ specification. In case of ``pip`` this is version ``18.0.0`` or | ||
later (released on 2018 July). If you cannot upgrade your pip to support this you need to ensure that the build | ||
requirements from `pyproject.toml <https://github.com/pypa/virtualenv/blob/master/pyproject.toml#L2>`_ are satisfied | ||
before triggering the install. | ||
|
||
via zipapp | ||
---------- | ||
|
||
|
@@ -43,6 +61,23 @@ minor release use the link ``https://bootstrap.pypa.io/virtualenv/x.y/virtualenv | |
supporting Python 2.7 use | ||
`https://bootstrap.pypa.io/virtualenv/2.7/virtualenv.pyz <https://bootstrap.pypa.io/2.7/virtualenv/virtualenv.pyz>`_. | ||
|
||
via ``setup.py`` | ||
---------------- | ||
We don't recommend and officially support this method. One should prefer using an installer that supports | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. s/and/nor/ |
||
`PEP-517 <https://www.python.org/dev/peps/pep-0517/>`_ interface, such as pip ``19.0.0`` or later. That being said you | ||
might be able to still install a package via this method if you satisfy build dependencies before calling the install | ||
command (as described under :ref:`sdist`). | ||
|
||
latest unreleased | ||
----------------- | ||
Installing an unreleased version is discouraged and should be only done for testing purposes. If you do so you'll need | ||
a pip version of at least ``18.0.0`` and use the following command: | ||
|
||
|
||
.. code-block:: console | ||
|
||
pip install git+https://github.com/pypa/virtualenv.git@master | ||
|
||
.. _compatibility-requirements: | ||
|
||
Python and OS Compatibility | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PyPI