@@ -80,7 +80,7 @@ $ sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/tens
80
80
81
81
You can now [ test your installation] ( #test-the-tensorflow-installation ) .
82
82
83
- ## Virtualenv installation
83
+ ## Virtualenv installation
84
84
85
85
[ Virtualenv] ( http://docs.python-guide.org/en/latest/dev/virtualenvs/ ) is a tool
86
86
to keep the dependencies required by different Python projects in separate
@@ -170,7 +170,7 @@ $ source ~/tensorflow/bin/activate.csh # If using csh.
170
170
(tensorflow)$ deactivate
171
171
```
172
172
173
- ## Docker installation
173
+ ## Docker installation
174
174
175
175
[ Docker] ( http://docker.com/ ) is a system to build self contained versions of a
176
176
Linux operating system running on your machine. When you install and run
@@ -290,7 +290,7 @@ $ python /usr/local/lib/python2.7/dist-packages/tensorflow/models/image/mnist/co
290
290
...
291
291
```
292
292
293
- ## Installing from sources
293
+ ## Installing from sources
294
294
295
295
When installing from source you will build a pip wheel that you then install
296
296
using pip. You'll need pip for that, so install it as described
@@ -491,7 +491,7 @@ best install that too:
491
491
$ sudo easy_install ipython
492
492
```
493
493
494
- #### Configure the installation
494
+ #### Configure the installation
495
495
496
496
Run the ` configure ` script at the root of the tree. The configure script
497
497
asks you for the path to your python interpreter.
@@ -504,7 +504,7 @@ Please specify the location of python. [Default is /usr/bin/python]:
504
504
Do you wish to build TensorFlow with GPU support? [y/N]
505
505
```
506
506
507
- ### Create the pip package and install
507
+ ### Create the pip package and install
508
508
509
509
``` bash
510
510
$ bazel build -c opt //tensorflow/tools/pip_package:build_pip_package
@@ -546,7 +546,30 @@ Validation error: 7.0%
546
546
...
547
547
```
548
548
549
- ## Common Problems
549
+ ## Setting up TensorFlow for Development
550
+
551
+ If you're working on TensorFlow itself, it is useful to be able to test your
552
+ changes in an interactive python shell without having to reinstall TensorFlow.
553
+
554
+ To set up TensorFlow such that all files are linked (instead of copied) from the
555
+ system directories, run the following commands inside the TensorFlow root
556
+ directory:
557
+
558
+ ``` bash
559
+ bazel build -c opt //tensorflow/tools/pip_package:build_pip_package
560
+ mkdir _python_build
561
+ cd _python_build
562
+ ln -s ../bazel-bin/tensorflow/tools/pip_package/build_pip_package.runfiles/* .
563
+ ln -s ../tensorflow/tools/pip_package/* .
564
+ python setup.py develop
565
+ ```
566
+
567
+ Note that this setup still requires you to rebuild the
568
+ ` //tensorflow/tools/pip_package:build_pip_package ` target every time you change
569
+ a C++ file; add, delete, or move any python file; or if you change bazel build
570
+ rules.
571
+
572
+ ## Common Problems
550
573
551
574
### GPU-related issues
552
575
0 commit comments