mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #4466 from kurtmckee/update-install-docs
Update install docs
This commit is contained in:
commit
cfd9528879
@ -45,7 +45,7 @@ toolkit (CMU Sphinx) and a full-text search database (Sphinx search).
|
||||
Mac OS X: Install Sphinx using MacPorts
|
||||
---------------------------------------
|
||||
|
||||
If you use Mac OS X `MacPorts <http://www.macports.org/>`_, use this command to
|
||||
If you use Mac OS X `MacPorts <https://www.macports.org/>`_, use this command to
|
||||
install all necessary software.
|
||||
|
||||
.. code-block:: bash
|
||||
@ -69,81 +69,48 @@ Windows: Install Python and Sphinx
|
||||
Install Python
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
Most Windows users do not have Python, so we begin with the installation of
|
||||
Python itself. If you have already installed Python, please skip this section.
|
||||
Most Windows users do not have Python, so we begin with the
|
||||
installation of Python itself. If you have already installed
|
||||
Python, please skip to the next section.
|
||||
|
||||
Go to https://www.python.org/, the main download site for Python. Look at the left
|
||||
sidebar and under "Quick Links", click "Windows Installer" to download.
|
||||
.. note::
|
||||
|
||||
Currently, Python offers two major versions, 2.x and 3.x. Sphinx 1.6 can run
|
||||
under Python 2.7, 3.4, 3.5, 3.6, with the recommended version being 2.7. This
|
||||
chapter assumes you are installing Python 2.7.
|
||||
|
||||
Go to https://www.python.org/, the main download site for Python.
|
||||
Hover over the "Downloads" menu and select a Python version to download.
|
||||
|
||||
.. image:: pythonorg.png
|
||||
|
||||
.. note::
|
||||
Follow the Windows installer for Python. When you reach the screen that
|
||||
lets you customize the installation, scroll to the bottom of the list
|
||||
and change "Add python.exe to Path" so that it will be installed.
|
||||
|
||||
Currently, Python offers two major versions, 2.x and 3.x. Sphinx 1.5 can run
|
||||
under Python 2.7, 3.4, 3.5, 3.6, with the recommended version being 2.7. This
|
||||
chapter assumes you have installed Python 2.7.
|
||||
.. image:: installpython.png
|
||||
|
||||
Follow the Windows installer for Python.
|
||||
|
||||
.. image:: installpython.jpg
|
||||
|
||||
After installation, you better add the Python executable directories to the
|
||||
environment variable ``PATH`` in order to run Python and package commands such
|
||||
as ``sphinx-build`` easily from the Command Prompt.
|
||||
|
||||
* Right-click the "My Computer" icon and choose "Properties"
|
||||
* Click the "Environment Variables" button under the "Advanced" tab
|
||||
|
||||
* If "Path" (or "PATH") is already an entry in the "System variables" list, edit
|
||||
it. If it is not present, add a new variable called "PATH".
|
||||
|
||||
* Add these paths, separating entries by ";":
|
||||
|
||||
- ``C:\Python27`` -- this folder contains the main Python executable
|
||||
- ``C:\Python27\Scripts`` -- this folder will contain executables added by
|
||||
Python packages installed with pip (see below)
|
||||
|
||||
This is for Python 2.7. If you use another version of
|
||||
Python or installed to a non-default location, change the digits "27"
|
||||
accordingly.
|
||||
|
||||
* Now run the **Command Prompt**. After command prompt window appear, type
|
||||
Now run the **Command Prompt**. After the command prompt window appears, type
|
||||
``python`` and Enter. If the Python installation was successful, the
|
||||
installed Python version is printed, and you are greeted by the prompt
|
||||
``>>>``. Type ``Ctrl+Z`` and Enter to quit.
|
||||
``>>>``:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
C:\>python
|
||||
Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] on win32
|
||||
Type "help", "copyright", "credits" or "license" for more information.
|
||||
>>>
|
||||
|
||||
Type ``Ctrl+Z`` and ``Enter`` to quit.
|
||||
|
||||
|
||||
Install the pip command
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Install Sphinx using pip
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Python has a very useful :command:`pip` command which can download and install
|
||||
3rd-party libraries with a single command. This is provided by the
|
||||
Python Packaging Authority(PyPA):
|
||||
https://groups.google.com/forum/#!forum/pypa-dev
|
||||
Type this line in the command prompt:
|
||||
|
||||
To install pip, download https://bootstrap.pypa.io/get-pip.py and
|
||||
save it somewhere. After download, invoke the command prompt, go to the
|
||||
directory with ``get-pip.py`` and run this command:
|
||||
|
||||
.. code-block:: bat
|
||||
|
||||
C:\> python get-pip.py
|
||||
|
||||
Now :command:`pip` command is installed. From there we can go to the Sphinx
|
||||
install.
|
||||
|
||||
.. note::
|
||||
|
||||
``pip`` has been contained in the Python official installation after version
|
||||
of Python-3.4.0 or Python-2.7.9.
|
||||
|
||||
|
||||
Installing Sphinx with pip
|
||||
--------------------------
|
||||
|
||||
If you finished the installation of pip, type this line in the command prompt:
|
||||
|
||||
.. code-block:: bat
|
||||
.. code-block:: text
|
||||
|
||||
C:\>pip install sphinx
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 25 KiB |
BIN
doc/installpython.png
Normal file
BIN
doc/installpython.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 46 KiB |
Binary file not shown.
Before Width: | Height: | Size: 146 KiB After Width: | Height: | Size: 50 KiB |
Loading…
Reference in New Issue
Block a user