You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by me...@apache.org on 2018/07/20 20:40:01 UTC

[beam-site] 01/02: Update Python quickstart with Windows instructions

This is an automated email from the ASF dual-hosted git repository.

mergebot-role pushed a commit to branch mergebot
in repository https://gitbox.apache.org/repos/asf/beam-site.git

commit feacae2a9c0aa069fa60cb43b41f1017fa2fa6d6
Author: Rafael Fernandez <rf...@google.com>
AuthorDate: Fri Jul 20 11:48:55 2018 -0700

    Update Python quickstart with Windows instructions
    
    PowerShell-specific instructions for Beamers using Microsoft Windows
---
 src/get-started/quickstart-py.md | 36 +++++++++++++++++++++++++++++++++++-
 1 file changed, 35 insertions(+), 1 deletion(-)

diff --git a/src/get-started/quickstart-py.md b/src/get-started/quickstart-py.md
index 3447aa4..e9edfea 100644
--- a/src/get-started/quickstart-py.md
+++ b/src/get-started/quickstart-py.md
@@ -46,9 +46,14 @@ pip --version
 If you do not have `pip` version 7.0.0 or newer, run the following command to
 install it. This command might require administrative privileges.
 
+{:.unix}
 ```
 pip install --upgrade pip
 ```
+{:.powershell}
+```
+PS> python -m pip install --upgrade pip
+```
 
 
 ### Install Python virtual environment
@@ -58,17 +63,27 @@ for initial experiments. If you do not have `virtualenv` version 13.1.0 or
 newer, run the following command to install it. This command might require
 administrative privileges.
 
+{:.unix}
 ```
 pip install --upgrade virtualenv
 ```
+{:.powershell}
+```
+PS> python -m pip install --upgrade virtualenv
+```
 
 If you do not want to use a Python virtual environment (not recommended), ensure
 `setuptools` is installed on your machine. If you do not have `setuptools`
 version 17.1 or newer, run the following command to install it.
 
+{:.unix}
 ```
 pip install --upgrade setuptools
 ```
+{:.powershell}
+```
+PS> python -m pip install --upgrade setuptools
+```
 
 ## Get Apache Beam
 
@@ -76,9 +91,14 @@ pip install --upgrade setuptools
 
 A virtual environment is a directory tree containing its own Python distribution. To create a virtual environment, create a directory and run:
 
+{:.unix}
 ```
 virtualenv /path/to/directory
 ```
+{:.powershell}
+```
+PS> virtualenv C:\path\to\directory
+```
 
 A virtual environment needs to be activated for each shell that is to use it.
 Activating it sets some environment variables that point to the virtual
@@ -86,11 +106,16 @@ environment's directories.
 
 To activate a virtual environment in Bash, run:
 
+{.unix}
 ```
 . /path/to/directory/bin/activate
 ```
+{.powershell}
+```
+PS> C:\path\to\directory\Scripts\activate.ps1
+```
 
-That is, source the script `bin/activate` under the virtual environment directory you created.
+That is, execute the `activate` script under the virtual environment directory you created.
 
 For instructions using other shells, see the [virtualenv documentation](https://virtualenv.pypa.io/en/stable/userguide/#activate-script).
 
@@ -98,9 +123,14 @@ For instructions using other shells, see the [virtualenv documentation](https://
 
 Install the latest Python SDK from PyPI:
 
+{:.unix}
 ```
 pip install apache-beam
 ```
+{:.powershell}
+```
+PS> python -m pip install apache-beam
+```
 
 #### Extra requirements
 
@@ -130,6 +160,10 @@ For example, run `wordcount.py` with the following command:
 ```
 python -m apache_beam.examples.wordcount --input /path/to/inputfile --output /path/to/write/counts
 ```
+{:.runner-direct-powershell}
+```
+python -m apache_beam.examples.wordcount --input C:\path\to\inputfile --output C:\path\to\write\counts
+```
 
 {:.runner-apex}
 ```