Skip to content
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

docs :Creating instructions for Windows users to install sam #605

Merged
merged 2 commits into from
Aug 7, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 53 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,24 +123,40 @@ containers – SAM CLI will do it automatically as required.
Windows, Linux, macOS with PIP
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Verify Python Version is 2.7 or 3.6.
Step 1. Verify Python Version is 2.7 or 3.6.

.. code:: bash

$ python --version

If not installed, go `download python and install <https://www.python.org/downloads/>`_

Step 2. Verify Pip is installed.

The easiest way to install ``sam`` is to use
`PIP <https://pypi.org/>`__.

.. code:: bash

$ pip --version

If not installed, `download and install pip <https://pip.pypa.io/en/stable/installing/>`_

Step 3. Install aws-sam-cli

.. code:: bash

$ pip install --user aws-sam-cli

**Adjust your PATH** to include Python scripts installed under User's directory.
Step 4. **Adjust your PATH** to include Python scripts installed under User's directory.

macOS & Linux
^^^^^^^^^^^^^

In Unix/Mac systems the command ``python -m site --user-base`` typically print ``~/.local`` path, so that you'll need to add ``/bin`` to obtain the script path

**NOTE**: As explained in the `Python Developer's Guide <https://www.python.org/dev/peps/pep-0370/#specification>`__, the User's directory where the scripts are installed is ``~/.local/bin`` for Unix/Mac and ``%APPDATA%\Python\Scripts`` for Windows.
**NOTE**: As explained in the `Python Developer's Guide <https://www.python.org/dev/peps/pep-0370/#specification>`__, the User's directory where the scripts are installed is ``~/.local/bin`` for Unix/Mac.

The Python command can help to detect the correct path. However, in Unix/Mac systems the command ``python -m site --user-base`` typically print ``~/.local`` path, so that you'll need to add ``/bin`` to obtain the script path, while in Windows systems the command ``py -m site --user-site`` typically print ``%APPDATA%\Roaming\Python<VERSION>\site-packages``, so you'll need to remove the last ``\site-packages`` folder and replace it with the ``\Scripts`` one.

.. code:: bash

Expand All @@ -159,6 +175,39 @@ Restart or Open up a new terminal and verify that the installation worked:
# Restart current shell
$ exec "$SHELL"
$ sam --version

Windows
^^^^^^^

In Windows systems the command ``py -m site --user-site`` typically print ``%APPDATA%\Roaming\Python<VERSION>\site-packages``, so you'll need to remove the last ``\site-packages`` folder and replace it with the ``\Scripts`` one.

.. code:: bash

$ python -m site --user-base

Using file explorer, go to the folder indicated in the output, and look for the ``Scripts`` folder. Visually confirm that sam Application is inside this folder.

Copy the File Path.

**NOTE**: As explained in the `Python Developer's Guide <https://www.python.org/dev/peps/pep-0370/#specification>`__, the User's directory where the scripts are installed is ``%APPDATA%\Python\Scripts`` for Windows.

Seach Windows for ``Edit the system environment variables``.

Select **Enviromental Variables**.

Under **System variables**, select **Path**.

Select **New** and enter the file path to the Python Scripts folder.

Step 5. Verify that sam is installed

Restart or Open up a new terminal and verify that the installation worked:

.. code:: bash

# Restart current shell
$ sam --version


Upgrading
~~~~~~~~~~
Expand Down