Thursday, December 15, 2016

OSX: how to install Tensorflow: upgrade pip and use virtualenv

After you have setup and activated you virtualenv if you run into this error on your Mac while trying to install tensorflow, upgrade pip and retry installing tensorflow.

Get the latest .whl file version from the virtualenv section of the following page:
https://www.tensorflow.org/get_started/os_setup#virtualenv_installation

pip install --upgrade tensorflow-0.12.0rc0-py2-none-any.whl
Unpacking ./tensorflow-0.12.0rc0-py2-none-any.whl
Downloading/unpacking protobuf==3.1.0 (from tensorflow==0.12.0rc0)
  Could not find a version that satisfies the requirement protobuf==3.1.0 (from tensorflow==0.12.0rc0) (from versions: 3.0.0b4, 3.0.0, 3.0.0b2.post2, 3.0.0a2, 3.0.0b2, 2.6.1, 2.0.3, 2.0.0beta, 2.5.0, 2.4.1, 2.6.0, 3.0.0b2.post1, 3.0.0b3, 3.0.0b1.post2, 3.0.0b2.post2, 3.0.0b2.post1, 2.3.0, 3.0.0a3, 3.1.0.post1)
Cleaning up...

No distributions matching the version for protobuf==3.1.0 (from tensorflow==0.12.0rc0)

Now upgrade pip and reinstall tensorflow.

easy_install --upgrade pip


pip install --upgrade tensorflow