Skip to content
This repository was archived by the owner on Jun 30, 2022. It is now read-only.

Commit b5b8508

Browse files
committed
Updates to internal documentation for package installation
----Release Notes---- [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=117161995
1 parent d4aef2e commit b5b8508

1 file changed

Lines changed: 26 additions & 3 deletions

File tree

README.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ from the Python programming language.
1818
* [Getting the Dataflow software](#getting-the-dataflow-software)
1919
* [Create and activate virtual environment](#create-and-activate-virtual-environment)
2020
* [Download and install](#download-and-install)
21+
* [Notes on installing with ``setup.py install``](#notes-on-installing-with-setuppy-install)
2122
* [Local execution of a pipeline](#local-execution-of-a-pipeline)
2223
* [A Quick Tour of the Source Code](#a-quick-tour-of-the-source-code)
2324
* [Some Simple Examples](#some-simple-examples)
@@ -133,9 +134,9 @@ your `virtualenv`:
133134
#### Install ``setuptools``
134135

135136
If you are not going to use a Python virtual environment (but we recommend you
136-
do; see the previous section), then you will need to ensure `setuptools`
137-
version 17.1 or newer is installed on your system (type `easy_install
138-
--version` to check). If you do not have that installed:
137+
do; see the previous section), ensure `setuptools` version 17.1 or newer is
138+
installed (type `easy_install --version` to check). If you do not have that
139+
installed:
139140

140141
pip install --upgrade setuptools
141142

@@ -169,6 +170,28 @@ URL into a ``pip install`` shell command, executing something like this:
169170
pip install https://github.com/GoogleCloud/DataflowPythonSDK/va.b.c.tar.gz
170171
```
171172

173+
#### Notes on installing with ``setup.py install``
174+
175+
We recommend installing using ``pip install``, as described above.
176+
However, you also may install from an unpacked source code tree.
177+
You can get such a tree by un-tarring the ``.tar.gz`` file or
178+
by using ``git clone``. From a source tree, you can install by running
179+
180+
cd DataflowPythonSDK*
181+
python setup.py install --root /
182+
python setup.py test
183+
184+
The ``--root /`` prevents Dataflow from being installed as an ``egg`` package.
185+
This workaround prevents failures if Dataflow is installed in the same virtual
186+
environment as another package under the ``google`` top-level package.
187+
188+
If you get import errors during or after installing with ``setup.py``,
189+
uninstall the package:
190+
191+
pip uninstall python-dataflow
192+
193+
and use the ``pip install`` method described above to re-install it.
194+
172195
## Local execution of a pipeline
173196

174197
The `$VIRTUAL_ENV/lib/python2.7/site-packages/google/cloud/dataflow/examples`

0 commit comments

Comments
 (0)