diff --git a/README.rst b/README.rst index 49d7c11f4c..2b67be4bdc 100644 --- a/README.rst +++ b/README.rst @@ -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 `_ + +Step 2. Verify Pip is installed. The easiest way to install ``sam`` is to use `PIP `__. +.. code:: bash + + $ pip --version + +If not installed, `download and install pip `_ + +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 `__, 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 `__, 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\site-packages``, so you'll need to remove the last ``\site-packages`` folder and replace it with the ``\Scripts`` one. .. code:: bash @@ -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\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 `__, 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 ~~~~~~~~~~