How to install tensorflow

Install tensor flow in virtualenv

Configuration:

  • macOS High Sierra 10.13.2
  • Virtualenv python3.6
  • Tensorflow 1.3.0

  1. Create a virtualenv environment.

    1
    2
    3
    pip3 install --upgrade virtualenv
    virtualenv -- system-site-packages -p python3 ~/tensorflow #python3
  2. Activate the virtualenv environment.

    1
    source ~/tensorflow/bin/activate
  3. Install tensor flow.

    1
    (tensorflow)$ pip3 install --upgrade tensorflow
  4. If you can’t import tensorflow in promt. Issue a command of the following format.

    1
    2
    pip3 install --upgrade
    \https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.3.0-py3-none-any.whl

结束!