From ad2b0cf0cb8cb33c907ed059bdbc4a095abec388 Mon Sep 17 00:00:00 2001 From: e3 Date: Tue, 5 Jan 2016 17:34:20 -0800 Subject: [PATCH] Revert "Use inspect to avoid virtual env custom site package pypa/virtualenv#228" This reverts commit 058bebff3390539609df3f3da6738664d3d547a5. --- tensorflow/g3doc/get_started/os_setup.md | 26 ++++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tensorflow/g3doc/get_started/os_setup.md b/tensorflow/g3doc/get_started/os_setup.md index 98a9d800aed689..8b88351c01d79b 100644 --- a/tensorflow/g3doc/get_started/os_setup.md +++ b/tensorflow/g3doc/get_started/os_setup.md @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 os; import inspect; import tensorflow; print(os.path.dirname(inspect.getfile(tensorflow)))' +$ python -c 'import site; print("\n".join(site.getsitepackages()))' ``` The simple demo model for classifying handwritten digits from the MNIST dataset @@ -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 @@ -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) @@ -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. @@ -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. @@ -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. @@ -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 @@ -546,7 +546,7 @@ Validation error: 7.0% ... ``` -## Common Problems +## Common Problems ### GPU-related issues @@ -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 e.g., +"ignore_installed" flag, ie sudo pip install --ignore-installed six https://storage.googleapis.com/....