Fix TensorFlow Python 0.10.0rc0 ProtoBuf Error

  • Post published:August 24, 2016

15658638

 

 

 

 

Hi, if you have trouble to use Google’s TensorFlow Python API with MAC OS X:

  1. Uninstall all previous TensorFlow and ProtoBuffer installations:
    1. pip uninstall tensorflow
    2. pip uninstall protobuf
    3. brew uninstall protobuf
  2. Reinstall TensorFlow (Update URL to latest master):
    1. export TF_BINARY_URL= https://storage. googleapis.com /tensorflow/mac/cpu/tensorflow-0.10.0rc0-py2-none-any.whl
    2. pip install –upgrade $TF_BINARY_URL
  3. Test TensorFlow (Python script):
    import tensorflow as tf
    hello = tf.constant(‘Hello, TensorFlow!’)
    sess = tf.Session()
    print(sess.run(hello))
    a = tf.constant(10)
    b = tf.constant(32)
    print(sess.run(a + b))