mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Move virtual environment explanation to installation
This commit is contained in:
@@ -29,10 +29,7 @@ which also supports *automatic* documentation generation.
|
||||
To follow the instructions you will need access to a Linux-like command line
|
||||
and a basic understanding of how it works,
|
||||
as well as a working Python installation for development,
|
||||
since you will use *Python virtual environments* to create the project
|
||||
(you can read more about them in the `Python Packaging User Guide`_).
|
||||
|
||||
.. _Python Packaging User Guide: https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/#creating-a-virtual-environment
|
||||
since you will use *Python virtual environments* to create the project.
|
||||
|
||||
Getting started
|
||||
---------------
|
||||
|
||||
@@ -185,6 +185,30 @@ the ``--pre`` flag.
|
||||
|
||||
$ pip install -U --pre sphinx
|
||||
|
||||
Using virtual environments
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
When installing Sphinx using pip,
|
||||
it is highly recommended to use *virtual environments*,
|
||||
which isolate the Installation
|
||||
and remove the need to use administrator privileges.
|
||||
To create a virtual environment in the ``.venv`` directory,
|
||||
use the following command.
|
||||
|
||||
::
|
||||
|
||||
$ python -m venv .venv
|
||||
|
||||
You can read more about them in the `Python Packaging User Guide`_.
|
||||
|
||||
.. _Python Packaging User Guide: https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/#creating-a-virtual-environment
|
||||
|
||||
.. warning::
|
||||
|
||||
Note like in some Linux distributions like Debian and Ubuntu
|
||||
this might require an extra installation step::
|
||||
|
||||
$ apt-get install python3-venv
|
||||
|
||||
Docker
|
||||
------
|
||||
|
||||
Reference in New Issue
Block a user