Skip to content

Commit

Permalink
Use inspect to avoid virtual env custom site package pypa/virtualenv#228
Browse files Browse the repository at this point in the history
  • Loading branch information
eerwitt committed Jan 5, 2016
1 parent 97522f0 commit 058bebf
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions tensorflow/g3doc/get_started/os_setup.md
Expand Up @@ -30,7 +30,7 @@ images are listed in the corresponding installation sections.
If you encounter installation errors, see
[common problems](#common-problems) for some solutions.

## Pip Installation
## Pip Installation

[Pip](https://en.wikipedia.org/wiki/Pip_(package_manager)) is a package
management system used to install and manage software packages written in
Expand Down Expand Up @@ -80,7 +80,7 @@ $ sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/tens

You can now [test your installation](#test-the-tensorflow-installation).

## Virtualenv installation
## Virtualenv installation

[Virtualenv](http://docs.python-guide.org/en/latest/dev/virtualenvs/) is a tool
to keep the dependencies required by different Python projects in separate
Expand Down Expand Up @@ -170,7 +170,7 @@ $ source ~/tensorflow/bin/activate.csh # If using csh.
(tensorflow)$ deactivate
```

## Docker installation
## Docker installation

[Docker](http://docker.com/) is a system to build self contained versions of a
Linux operating system running on your machine. When you install and run
Expand Down Expand Up @@ -219,7 +219,7 @@ $ path/to/repo/tensorflow/tools/docker/docker_run_gpu.sh b.gcr.io/tensorflow/ten

You can now [test your installation](#test-the-tensorflow-installation) within the Docker container.

## Test the TensorFlow installation
## Test the TensorFlow installation

### (Optional, Linux) Enable GPU Support

Expand Down Expand Up @@ -269,7 +269,7 @@ The exact location of the Python library depends on your system, but is usually
You can find out the directory with the following command:

```bash
$ python -c 'import site; print("\n".join(site.getsitepackages()))'
$ python -c 'import os; import inspect; import tensorflow; print(os.path.dirname(inspect.getfile(tensorflow)))'
```

The simple demo model for classifying handwritten digits from the MNIST dataset
Expand All @@ -290,7 +290,7 @@ $ python /usr/local/lib/python2.7/dist-packages/tensorflow/models/image/mnist/co
...
```

## Installing from sources
## Installing from sources

When installing from source you will build a pip wheel that you then install
using pip. You'll need pip for that, so install it as described
Expand Down Expand Up @@ -331,7 +331,7 @@ binary path.
$ sudo apt-get install python-numpy swig python-dev
```

#### Configure the installation
#### Configure the installation

Run the `configure` script at the root of the tree. The configure script
asks you for the path to your python interpreter and allows (optional)
Expand All @@ -344,7 +344,7 @@ $ ./configure
Please specify the location of python. [Default is /usr/bin/python]:
```

#### Optional: Install CUDA (GPUs on Linux)
#### Optional: Install CUDA (GPUs on Linux)

In order to build or run TensorFlow with GPU support, both Cuda Toolkit 7.0 and
CUDNN 6.5 V2 from NVIDIA need to be installed.
Expand Down Expand Up @@ -376,7 +376,7 @@ sudo cp cudnn-6.5-linux-x64-v2/cudnn.h /usr/local/cuda/include
sudo cp cudnn-6.5-linux-x64-v2/libcudnn* /usr/local/cuda/lib64
```

##### Configure TensorFlow's canonical view of Cuda libraries
##### Configure TensorFlow's canonical view of Cuda libraries
When running the `configure` script from the root of your source tree, select
the option `Y` when asked to build TensorFlow with GPU support.

Expand Down Expand Up @@ -491,7 +491,7 @@ best install that too:
$ sudo easy_install ipython
```

#### Configure the installation
#### Configure the installation

Run the `configure` script at the root of the tree. The configure script
asks you for the path to your python interpreter.
Expand All @@ -504,7 +504,7 @@ Please specify the location of python. [Default is /usr/bin/python]:
Do you wish to build TensorFlow with GPU support? [y/N]
```

### Create the pip package and install
### Create the pip package and install

```bash
$ bazel build -c opt //tensorflow/tools/pip_package:build_pip_package
Expand Down Expand Up @@ -546,7 +546,7 @@ Validation error: 7.0%
...
```

## Common Problems
## Common Problems

### GPU-related issues

Expand Down Expand Up @@ -635,7 +635,7 @@ copy of Python.

On El Capitan, "six" is a special package that can't be modified, and this
error is reported when "pip install" tried to modify this package. To fix use
"ignore_installed" flag, ie
"ignore_installed" flag e.g.,

sudo pip install --ignore-installed six https://storage.googleapis.com/....

Expand Down

0 comments on commit 058bebf

Please sign in to comment.