Skip to content
Permalink
Browse files

doc: Consolidate Python and pip documentation

The documentation that describes how Python and pip interact with the OS
when installing packages used to be under a common section, and was
moved to the west bootstrap one later on. Since this information is
required early on (for example on Linux when installing CMake via pip3),
move the info to its own section and link to it from others.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
  • Loading branch information...
carlescufi committed Jul 25, 2019
1 parent 6c73652 commit 9b13d5158901c1c485a6f609d2bd200cb7d1b63a
Showing with 30 additions and 14 deletions.
  1. +28 −12 doc/getting_started/index.rst
  2. +1 −1 doc/getting_started/installation_linux.rst
  3. +1 −1 doc/guides/west/install.rst
@@ -15,6 +15,33 @@ environment, then build and run a sample application.
Install Host Dependencies
*************************

.. _python-pip:

Python and pip
==============

Python 3 and its package manager, pip\ [#pip]_, are used extensively by Zephyr
to install and run scripts that are required to compile and run Zephyr
applications.

Depending on your operating system, you may or may not need to provide the
``--user`` flag to the ``pip3`` command when installing new packages. This is
documented throughout the instructions.
See `Installing Packages`_ in the Python Packaging User Guide for more
information about pip\ [#pip]_, including this `information on -\\-user`_.

- On Linux, make sure ``~/.local/bin`` is on your :envvar:`PATH`
:ref:`environment variable <env_vars>`, or programs installed with ``--user``
won't be found\ [#linux_user]_.

- On macOS, `Homebrew disables -\\-user`_.

- On Windows, see the Installing Packages information on ``--user`` if you
require using this option.

Install the required tools
===========================

Follow an operating system specific guide, then come back to this page.

.. toctree::
@@ -46,18 +73,7 @@ First, install the ``west`` binary and bootstrapper using ``pip3``:
# macOS (Terminal) and Windows (cmd.exe)
pip3 install west

See :ref:`west-install` for additional details on installing west. See
`Installing Packages`_ in the Python Packaging User Guide for more information
about pip\ [#pip]_, including this `information on -\\-user`_.

- On Linux, make sure ``~/.local/bin`` is on your :envvar:`PATH`
:ref:`environment variable <env_vars>`, or programs installed with ``--user``
-- like west -- won't be found\ [#linux_user]_.

- On macOS, `Homebrew disables -\\-user`_.

- On Windows, see the Installing Packages information on ``--user`` if you
require using this option.
See :ref:`west-install` for additional details on installing west.

.. _clone-zephyr:

@@ -119,7 +119,7 @@ Arch Linux:
using ``cmake --version``. If you have an older version, there are several ways
of obtaining a more recent one:

* Use ``pip``:
* Use ``pip3`` (see :ref:`python-pip` for more details):

.. code-block:: console

@@ -15,7 +15,7 @@ On Windows and macOS::
pip3 install -U west

.. note::
See :ref:`gs_python_deps` for additional clarification on using the
See :ref:`python-pip` for additional clarification on using the
``--user`` switch.

Afterwards, you can run ``pip3 show -f west`` for information on where the west

0 comments on commit 9b13d51

Please sign in to comment.
You can’t perform that action at this time.