Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing “activate the Virtualenv” #15097

Merged
merged 1 commit into from
Dec 4, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 17 additions & 14 deletions tensorflow/docs_src/install/install_mac.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,22 +79,23 @@ Take the following steps to install TensorFlow with Virtualenv:
4. Activate the Virtualenv environment by issuing one of the
following commands:

<pre>$ <b>source ~/tensorflow/bin/activate</b> # If using bash, sh, ksh, or zsh
$ <b>source ~/tensorflow/bin/activate.csh</b> # If using csh or tcsh </pre>
<pre>$ <b>cd <i>targetDirectory</i></b>
$ <b>source ./bin/activate</b> # If using bash, sh, ksh, or zsh
$ <b>source ./bin/activate.csh</b> # If using csh or tcsh </pre>

The preceding `source` command should change your prompt to the following:

<pre> (tensorflow)$ </pre>
<pre> (<i>targetDirectory</i>)$ </pre>

5. Ensure pip ≥8.1 is installed:

<pre> (tensorflow)$ <b>easy_install -U pip</b></pre>
<pre> (<i>targetDirectory</i>)$ <b>easy_install -U pip</b></pre>

6. Issue one of the following commands to install TensorFlow and all the
packages that TensorFlow requires into the active Virtualenv environment:

<pre> (tensorflow)$ <b>pip install --upgrade tensorflow</b> # for Python 2.7
(tensorflow)$ <b>pip3 install --upgrade tensorflow</b> # for Python 3.n
<pre> (<i>targetDirectory</i>)$ <b>pip install --upgrade tensorflow</b> # for Python 2.7
(<i>targetDirectory</i>)$ <b>pip3 install --upgrade tensorflow</b> # for Python 3.n

7. Optional. If Step 6 failed (typically because you invoked a pip version
lower than 8.1), install TensorFlow in the active
Expand Down Expand Up @@ -128,24 +129,26 @@ to confirm that the installation worked properly.

Note that you must activate the Virtualenv environment each time you
use TensorFlow in a new shell. If the Virtualenv environment is not
currently active (that is, the prompt is not `(tensorflow)`, invoke
currently active (that is, the prompt is not `(<i>targetDirectory</i>)`, invoke
one of the following commands:

<pre>$ <b>source ~/tensorflow/bin/activate</b> # bash, sh, ksh, or zsh
$ <b>source ~/tensorflow/bin/activate.csh</b> # csh or tcsh </pre>
<pre>$ <b>cd <i>targetDirectory</i></b>
$ <b>source ./bin/activate</b> # If using bash, sh, ksh, or zsh
$ <b>source ./bin/activate.csh</b> # If using csh or tcsh </pre>


Your prompt will transform to the following to indicate that your
tensorflow environment is active:

<pre> (tensorflow)$ </pre>
<pre> (<i>targetDirectory</i>)$ </pre>

When the Virtualenv environment is active, you may run
TensorFlow programs from this shell.

When you are done using TensorFlow, you may deactivate the
environment by issuing the following command:

<pre> (tensorflow)$ <b>deactivate</b> </pre>
<pre> (<i>targetDirectory</i>)$ <b>deactivate</b> </pre>

The prompt will revert back to your default prompt (as defined by `PS1`).

Expand Down Expand Up @@ -331,19 +334,19 @@ Take the following steps to install TensorFlow in an Anaconda environment:
3. Activate the conda environment by issuing the following command:

<pre>$ <b>source activate tensorflow</b>
(tensorflow)$ # Your prompt should change</pre>
(<i>targetDirectory</i>)$ # Your prompt should change</pre>

4. Issue a command of the following format to install
TensorFlow inside your conda environment:

<pre>(tensorflow)<b>$ pip install --ignore-installed --upgrade</b> <i>TF_PYTHON_URL</i></pre>
<pre>(<i>targetDirectory</i>)<b>$ pip install --ignore-installed --upgrade</b> <i>TF_PYTHON_URL</i></pre>

where <i>TF_PYTHON_URL</i> is the
[URL of the TensorFlow Python package](#the_url_of_the_tensorflow_python_package).
For example, the following command installs the CPU-only version of
TensorFlow for Python 2.7:

<pre> (tensorflow)$ <b>pip install --ignore-installed --upgrade \
<pre> (<i>targetDirectory</i>)$ <b>pip install --ignore-installed --upgrade \
https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.4.0-py2-none-any.whl</b></pre>


Expand Down